#25407 [NEW]: $HTTP_GET_VARS and $HTTP_POST_VARS
| From: | louison dot raymond at libertysurf dot fr | Date: | Sun, 07 Sep 2003 02:58:49 +0000 |
| Subject: | #25407 [NEW]: $HTTP_GET_VARS and $HTTP_POST_VARS | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-47165@lists.php.net to get a copy of this message | ||
From: louison dot raymond at libertysurf dot fr
Operating system: windows xp pro
PHP version: 4.3.1
PHP Bug Type: Unknown/Other Function
Bug description: $HTTP_GET_VARS and $HTTP_POST_VARS
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 bug report at http://bugs.php.net/?id=25407&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=25407&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=25407&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=25407&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=25407&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=25407&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=25407&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=25407&r=support
Expected behavior: http://bugs.php.net/fix.php?id=25407&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=25407&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=25407&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=25407&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25407&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=25407&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=25407&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=25407&r=gnused