enter image description here

when i register for free sign up on membermouse.data is entered into wordpress table and membermouse table .

My question:

how can we get last inserted id from wordpress user table in membermouse free sign up page .???


how can we copy last member details inserted into wordpress user table to my own table (with php or mysql queries automatically).??

database screenshots:

wordpress table(entries with membermouse)

my table
enter image description here

Code :

my custom sign up code doesn’t work under $req=$orderRequest->submitRequest();,so i put above. .i also know both queries are working on same time,thats why i’m unable to get lastinserted id .

//my custom sign up code to insert entry into my own table.
$email=$_POST['email'] ;   
global  $wpdb;  
 $randomFact = $wpdb->get_results( "SELECT ID FROM lwy_users where user_email='".$email."'");
$memid=$randomFact[0]->ID;  //this  $memid is null ..i want value of  $memid
   if( email_exists( $email )) 
$wpdb->query("insert into mm_members (MemberID,MemberUserEmail ,MemberPassword,MemberClass) VALUES ('".$memid."','".$email."','".$pass."','B') "  );
//membermouse sign up code
$orderRequest = new MM_FreeMemberWebformRequest($_POST);

Read more here: Get last inserted id in sign up page in membermouse plugin?


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Related Wordpress search:

, , , ,

Wordpress related questions and answers: