Hello,
I have this: $MSG_id=mysql_insert_id();
How can I save $MSG_id value so i can use it in another query?
thank you
HOW TO SAVE mysql_insert_id() value
Moderator: General Moderators
Re: HOW TO SAVE mysql_insert_id() value
Hi
Can you give some more details.
Also if you want to store it another query you just use that variable.
Regards
iijb
Can you give some more details.
Also if you want to store it another query you just use that variable.
Regards
iijb
Re: HOW TO SAVE mysql_insert_id() value
Store it in a session.
Code: Select all
session_start();
// ... Code and queries
$_SESSION['userID'] = mysql_insert_id();