|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Submitted: 2003-09-06 22:58 UTC Modified: 2003-09-06 23:17 UTC
From: louison dot raymond at libertysurf dot fr Assigned:
Status: Not a bug Package: Unknown/Other Function
PHP Version: 4.3.1 OS: windows xp pro
Private report: No CVE-ID: None
 [2003-09-06 22:58 UTC] louison dot raymond at libertysurf dot fr
If you submit a form with checkbox inputs which have same name but differents value, the $HTTP_GET_VARS and $HTTP_POST_VARS contain one value (not all the checkbox checked).
Nevertheless, the browser send values of all the checked inputs.

xp pro whith all updates
Browser : Microsoft Internet Explorer Version 6.0.2600.0000.xpclnt_qfe.021108-2107

php.ini changes:
cgi.force_redirect = 0
fastcgi.impersonate = 1
file_uploads = On
upload_max_filesize = 2M

Reproduce code:
<FORM NAME="f" ACTION="http://localhost/test.php" METHOD="post" >
  <INPUT TYPE="Checkbox" NAME="groupes" VALUE="65">
  <INPUT TYPE="Checkbox" NAME="groupes" VALUE="55">
  <INPUT TYPE="Checkbox" NAME="groupes" VALUE="50">
  <INPUT TYPE="submit" >


Expected result:
Array ( [groupes] => Array ( [0]=>65 [1]=>55 [2]=>50 ) )
For sample or
Array ( [groupes] => "65_55_50" )

Actual result:
result: Array ( [groupes] => 50 )
Yet i checked the three inputs and the browser send this query string :groupes=65&groupes=55&groupes=50

(This result is normal when it is known that $HTTP_POST_VARS is an associate array but it's not very logical)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-09-06 23:17 UTC]
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

This is expected behavior.  Please reference the manual section on passing arrays via HTML forms.
PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC