From: cigorin at pobox dot sk Operating system: Debian GNU/Linux PHP version: 4.3.4 PHP Bug Type: Unknown/Other Function Bug description: can't use checkboxes sharing same control name
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 bug report at http://bugs.php.net/?id=27319&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=27319&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=27319&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=27319&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=27319&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=27319&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=27319&r=needscript Try newer version: http://bugs.php.net/fix.php?id=27319&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=27319&r=support Expected behavior: http://bugs.php.net/fix.php?id=27319&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=27319&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=27319&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=27319&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27319&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=27319&r=dst IIS Stability: http://bugs.php.net/fix.php?id=27319&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=27319&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=27319&r=float
