Checkboxes and arrays

TOWT

In Runtime
Messages
110
How would one use an array to use checkboxes?
could someone give me an example?
 
Check boxes don't use arrays.
radio boxes are arrays...

for a check box you have a series of boxes, and each can be checked

eg,
<input type=checkbox name=colour1 value=red />red
<input type=checkbox name=colour2 value=green />green
<input type=checkbox name=colour3 value=blue />blue

whilst radio boxes work in arrays where there is an array of elements, but only one value is passed through to the results page.
<input type=radio name=colour value=red />red
<input type=radio name=colour value=green />green
<input type=radio name=colour value=blue />blue
 
opps .... lol
then if you wanted to use an if statement you would do something like this?

if (color1 = on){
do this
}

is this the correct way to check for the check box?
and by the way what is the integer/number symbol for php/html varibles

example
$ = string
 
Back
Top Bottom