HardCoreMore Posted March 30, 2008 Share Posted March 30, 2008 Hi, how can i when user register and get unique userID to set userID to be the same in both tables in mysql. Here is how my tables look like: When user register i use users table to store data about the user and i have two same columns called userID in users table and user_docs table. How can i enter at the same time userID in users and user_docs table when user register. Should i use php for this or i should set it up in mysql. This is the query that i use to enter data in users table mysql_query ("insert into users set name = '$user', password = password('$pass'),email = '$email'"); What query should i run or how to set it up? Link to comment https://forums.phpfreaks.com/topic/98711-set-same-userid-in-two-diffrent-tables-within-the-same-database/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.