I'm trying to design a database for my website but i have a little problem with making related tables .
I have two tables . Table1 and Table2
Table1 is used to store user`s information and Table2 is used to store their activation codes
To relate them i need to store each user's ID in Table1 , inside Each record of Table2 so that i can get my user`s activation code
And as i know it is how relational databases work.
My problem is when using php to run mysql commands and add new user information in Table1 , How can i find What ID Number will be assigned to my user so that i can save both Id and activation code in my other table ?