Question
insert behavior query
Hi there
I wonder if anyone could help.
I have an html form which insert data to a mysql db.
I am sticking at a particular point:
I have three tick boxes ( A , B, C ) if left blank the data in their corresponding db field is 0, if ticked it's 1.
I have three other db fields which I use to check the access level of a user to partuclar leve in the site ( L1, L2, L3 ) they are set to 0 by default
if the user tick the A box, it add a 1 to the L1 box so leave L2 and L3 values are still 0 . all is well and it works
I would like the following, if the user tick B, it should add the value 1 ot L1 AND L2
and If the user tick C, it should add the value 1 to L1, L2 and L3
to sumarise, Is it possible to write data in 2 or more db field from the input of 1 checkbox ( if that make sens )
Any advice would be appreciated
CHeers
Chris
I wonder if anyone could help.
I have an html form which insert data to a mysql db.
I am sticking at a particular point:
I have three tick boxes ( A , B, C ) if left blank the data in their corresponding db field is 0, if ticked it's 1.
I have three other db fields which I use to check the access level of a user to partuclar leve in the site ( L1, L2, L3 ) they are set to 0 by default
if the user tick the A box, it add a 1 to the L1 box so leave L2 and L3 values are still 0 . all is well and it works
I would like the following, if the user tick B, it should add the value 1 ot L1 AND L2
and If the user tick C, it should add the value 1 to L1, L2 and L3
to sumarise, Is it possible to write data in 2 or more db field from the input of 1 checkbox ( if that make sens )
Any advice would be appreciated
CHeers
Chris
