ID: 12304
Updated by: zak
Reported By: [EMAIL PROTECTED]
Status: Bogus
Bug Type: Unknown/Other Function
Operating System: win98
PHP Version: 4.0.4
New Comment:
This is a browser issue - try this sample code:
form
input type=checkbox name=test /
input type=submit /
/form
Note how when the checkbox is not selected and submit is pressed, the query string
consists of only '?'
If you need to keep track of what checkboxes are on a page, you could set a list in a
hidden field and then use PHP to compare the list of fields in the hidden field to the
fields passed to the form.
Something like this:
input type=hidden name=checkboxes value=foo,bar /
?php
foreach (explode (',', $checkboxes) as $field) {
if (isset ($$field))
continue;
$$field = 0;
}
?
Previous Comments:
[2001-07-22 05:31:16] [EMAIL PROTECTED]
Right, that's what's supposed to happen. As per the spec,
browsers don't send checkboxes in the request if they
weren't selected.
[2001-07-22 00:52:25] [EMAIL PROTECTED]
does not recognise checkbox from html forms as a variable unless they are checked
Edit this bug report at http://bugs.php.net/?id=12304edit=1
--
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]