ID:               25407
 Updated by:       [EMAIL PROTECTED]
 Reported By:      louison dot raymond at libertysurf dot fr
-Status:           Open
+Status:           Bogus
 Bug Type:         Unknown/Other Function
 Operating System: windows xp pro
 PHP Version:      4.3.1
 New Comment:

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 http://www.php.net/support.php 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.


Previous Comments:
------------------------------------------------------------------------

[2003-09-06 22:58:49] louison dot raymond at libertysurf dot fr

Description:
------------
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.

Configuration:
xp pro whith all updates
SERVER_SOFTWARE : Microsoft-IIS/5.1
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" >
</form>

test.php:
<?php
print_r($HTTP_POST_VARS);
?>

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)


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=25407&edit=1

Reply via email to