mardi 27 janvier 2015

how to post indeterminate checkbox with php?

I have 2 checkboxes. checkbox1 is checked and checkbox2 is indeterminated.



<input type="checkbox" name="checkboxes[]">
<input type="checkbox" name="checkboxes[]">


then i post them to another php. i give them by this code:



foreach($_POST['checkboxes'] as $checkbox){
echo $checkbox;
}


but this code just give checkbox that is checked!





Aucun commentaire:

Enregistrer un commentaire