|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Inserting records into database
Hi all,
I have created a multiple page survey form which collects a user's opinion. The Userid field is primary key and is auto_increment. How do I ensure that subsequent questions answered are inserted into that particular user's record? in other words, how do i get the primary key carried over to the next page for current user filling out the survey.... thanks. |
|
#2
|
||||
|
||||
|
Depends if you want to use php you can use mysql_insert_id() (if you're using mysql) or directly from the query you can use the mysql function last_insert_id()
|
![]() |
| Viewing: Dev Articles Community Forums > Programming > PHP Development > Inserting records into database |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|