luv2learn
01 Feb 2010, 05:04 PM
Hi,
Please show me how to write this using php and myslq:
I have a form with checkbox.
checkbox1 = c1
checkbox2 = c2
checkbox 3 = c3
each user can select only 2
click submit -> then it insert into the database.
I have a table with 3 columns
example table:
a = user
c = value
ID A B
1 a c1
2 a c2
3 b c1
4 b c3
I use $_session to insert user, but i don't know how to insert the 2 values from the checkbox into 2 different rows. Please help!
Thanks in advance!
Please show me how to write this using php and myslq:
I have a form with checkbox.
checkbox1 = c1
checkbox2 = c2
checkbox 3 = c3
each user can select only 2
click submit -> then it insert into the database.
I have a table with 3 columns
example table:
a = user
c = value
ID A B
1 a c1
2 a c2
3 b c1
4 b c3
I use $_session to insert user, but i don't know how to insert the 2 values from the checkbox into 2 different rows. Please help!
Thanks in advance!