Interesting way to solve the problem. I thought about checking whether the
keys are present (if not the checkbox is set to "N".)
I wil definitily try this option as well.
Thxs all!
Sjef
"Al" <[EMAIL PROTECTED]> schreef in bericht
news:[EMAIL PROTECTED]
> Sjef Janssen wrote:
>> Hallo,
>> I have a
Sjef Janssen wrote:
Hallo,
I have a form with a number of checkboxes grouped together. The value of
these boxes is stored in an array: $used[]. Now I found that the value of
checked boxes (value = 'Y') are stored in the array while non checked boxes
are not stored at all. This makes the array inc
Do something like:
$checkboxes = array('food','drink','smoking');
// display the checkboxes
foreach($checkboxes as $checkbox) {
echo "$checkbox: ";
}
Then when processing the form input check if each of the $checkboxes
array values are present, if not, you can set to something else s
Would it be enough to set a key for each checkbox, for example explicitly
say:
checkbox[1]
checkbox[2]
checkbox[3]
then a non checked box will have an empty string as a value, whereas the
checked ones will have a value of 'Y'.
Nope. That's the problem. If a checkbox is unchecked the browser do
Would it be enough to set a key for each checkbox, for example explicitly
say:
checkbox[1]
checkbox[2]
checkbox[3]
then a non checked box will have an empty string as a value, whereas the
checked ones will have a value of 'Y'.
Sjef
"David Dorward" <[EMAIL PROTECTED]> schreef in bericht
news:[E
Sjef Janssen wrote:
> I have a form with a number of checkboxes grouped together. The value of
> these boxes is stored in an array: $used[]. Now I found that the value of
> checked boxes (value = 'Y') are stored in the array while non checked
> boxes are not stored at all. This makes the array inc
6 matches
Mail list logo