GodDoesntExist
asked on
Get current id from MySQL post/query?
Hi Experts!
In the same PHP file I want to:
1. I want to create a new user and post it to the database (that code is already created)
2. echo the user id for that new user.
How can I do that?
I could find out the highest user id from the database and echo that, but it doesnt feel 100% safe.
Is there a way to find out the "current" id that was posted at that moment?
Thanks in advice!
In the same PHP file I want to:
1. I want to create a new user and post it to the database (that code is already created)
2. echo the user id for that new user.
How can I do that?
I could find out the highest user id from the database and echo that, but it doesnt feel 100% safe.
Is there a way to find out the "current" id that was posted at that moment?
Thanks in advice!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Perfect solution!