check email exist or not

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

        $email = [email protected];
        $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 *