Page 1 of 1

multiple checkbox

Posted: Mon Nov 21, 2005 4:52 pm
by milleusi
i need th number, values of my checkboxes. where is the problem?

select id from.....
.....
echo"<input type='checkbox' name='id[]' value='".$row['id']."' >";
......

i need all the checkbox values in a POST, but i get them only when are checked.


thx

Posted: Mon Nov 21, 2005 5:00 pm
by wtf
why do you need them all?

Posted: Mon Nov 21, 2005 5:07 pm
by milleusi
in fact i'm interested by the index of the checked box

Posted: Tue Nov 22, 2005 6:11 am
by milleusi
i need to send more values with the checked box. How to do that?

Posted: Tue Nov 22, 2005 6:49 pm
by Burrito
you'll need to loop over the checkbox array on the php side to net out all of the values.

use a foreach loop to do that.