lundi 12 janvier 2015

Hot to add unchecked checkbbox value to array? [duplicate]


This question already has an answer here:




When press button i want to get array Array ( [0] => 1 [1] => 0 [2] => 1 [3] => 0 )


How can i do that ?



<form id="fid" name="f1" method="post">
<input name="aa[]" type="checkbox" value="1" checked/>
<input name="aa[]" type="checkbox" value="1"/>
<input name="aa[]" type="checkbox" value="1" checked/>
<input name="aa[]" type="checkbox" value="1" />
<input type="submit" name="submit" value="Submit" />
</form>




Aucun commentaire:

Enregistrer un commentaire