check email exist or not

        global $wpdb;
        $table_name = $wpdb->prefix . “wcmnd_analytics”;

        $email = “hivejat556@carpppetd.com”;
        $sql = SELECT email FROM $table_name WHERE email =‘$email’ ;
        $existEmail =  $wpdb->get_var($sql);

        if (!$existEmail) {
            echo ‘not exists’;
        }
        else{
            echo ‘ exists’;
        }  

Leave a Comment

Your email address will not be published. Required fields are marked *