#27319 [Opn->Bgs]: can't use checkboxes sharing same control name
| From: | derick@php.net | Date: | Thu, 19 Feb 2004 09:25:36 +0000 |
| Subject: | #27319 [Opn->Bgs]: can't use checkboxes sharing same control name | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-55183@lists.php.net to get a copy of this message | ||
ID: 27319
Updated by: derick@php.net
Reported By: cigorin at pobox dot sk
-Status: Open
+Status: Bogus
Bug Type: Unknown/Other Function
Operating System: Debian GNU/Linux
PHP Version: 4.3.4
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
.
Previous Comments:
------------------------------------------------------------------------
[2004-02-19 04:15:25] cigorin at pobox dot sk
Description:
------------
When there are more checkboxes within form, which share same control
name, it is impossible to get all checked values after form is
submitted. The problem holds over regardless what method is used.
Normally I'd expect array of values in $_REQUEST superglobal variable
instead of single basic value. To be honest I've found the problem in
PHP Version 4.3.3 and didn't check if it exists in later versions.
Reproduce code:
---------------
<?php //this is file example.php
print_r($_REQUEST['records']);
?>
<form method="get" action="example.php">
<input type="checkbox" name="records" value="A" checked>
<input type="checkbox" name="records" value="B" checked>
<input type="submit">
</form>
Expected result:
----------------
Array ( [1] => A [2] => B)
Actual result:
--------------
B
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=27319&edit=1