Multiple Auto_Increments?

admin

Administrator
Staff member
In my user registration form, people are asked to select some options, they can select as many as they want (with in reason) from a list of about 100. The main user details are entered into a table which is gived a unique user_id, and the options they selct are entered into another table along with the user_id (for which i use mysql_insert_id), the problem is I can get the user_id to be entered for 1 option, but if they select 2 or more, it doesn't want to work. How would I got about getting the user_id copied to every record they enter?
My tables are...
Tabel 1
--------------------------------
| user_id | user_name | address |
--------------------------------
Table 2
-----------------------------
| code_id | user_id | option |
-----------------------------

So if a user registers, he is given user_id 01, which is then copied to table 2. If he selects 3 options, his user_id is copied 3 times.
Does this many ANY sense?
Any help greatly appreciated.
 
Back
Top