Page 1 of 1

How do I pass an empty checkbox value?

Posted: Thu Dec 11, 2008 5:16 am
by sjk1000
Hi all
I need to pass a empty checkbox value to an array. The script below is from a loop that may be repeated n times. I need all checked and unchecked values to be stored in the array. At the moment if l have 6 rows unchecked followed by 2 rows checked, the output array only has 2 elements. How do I deal with this?
Thanks, Steve
:)

Code: Select all

print "<TD align = center><INPUT type='checkbox' name='remove[]' id='remove' VALUE = 'Yes'></TD></TR>";

Re: How do I pass an empty checkbox value?

Posted: Thu Dec 11, 2008 5:42 am
by requinix
You cannot get the checkboxes that were left unchecked. You must find out what options where available, which were selected, and the difference will be the ones not chosen.