I am trying to get a new user_id from one table and enter it into another table. ie.
The form first INSERTS the client info into the clients table. The id column automatically creates a unique id by having auto increment set and unique set to the ID column.
clients table
- id
Here's my problem... How do I get that last 'id' value to pass to the next form for the username and password? ( INSERT INTO user_pass SET user='$userVal', pass='$passVal', id='$THIS_IS_THE_ID_JUST_INSERTED'; )
user_pass table
- id (generated from last INSERT).
Thanks in advance for any help!
By the way i'm using PHP 4 and MySQL, just in case there might be any built in functions that I could use for this purpose.