#23197 [NEW]: $_POST / $_GET incorrect

From: Date: Mon, 14 Apr 2003 08:35:35 +0000
Subject: #23197 [NEW]: $_POST / $_GET incorrect
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-37634@lists.php.net to get a copy of this message
From: Guus-Leeu at gmx dot de Operating system: Linux 2.4.18 PHP version: 4.3.2RC1 PHP Bug Type: *General Issues Bug description: $_POST / $_GET incorrect Setup of PHP4.3.2.RC1 (CVS copy of that branch) ./configure --with-apxs=/usr/local/apache/bin/apxs --with-openssl --with-ldap=/usr/local/openldap --enable-mysql --with-mysql=/usr/local/mysql --prefix=/usr/local/php4_cvs Suppose I have <form action="my.php" method="post"> <select name="preferredLanguage" multiple> <option value="1">English</option> <option value="2">German</option> <option value="3">Dutch</option> </select> </form> Suppose, the user selects German and Dutch by CTRLclicking the entries. The array $_POST ends up having $_POST["preferredLanguage"] == "3" rather than $_POST["preferredLanguage"][0] == "2" && $_POST["preferredLanguage"][1] == "3" The $_QUERY_STRING (if using method="GET") contains both values, but the $_GET array is not set correctly. I suppose, this has to do with the fact that values are just registered one after the other, as is the case in php_std_post_handler(), whereas it would be nice to have a prelookup if the key already exists and then build an array for its value. I'm not sure where I can fix this, but if you give me the right pointers, I'm sure able to do it myself. I'ld suggest building an array for the key's value that has: ["count"] number of elements [0] first value [1] second value etc. Or did I miss something in my compilation? Cheers, Guus -- Edit bug report at http://bugs.php.net/?id=23197&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=23197&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=23197&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=23197&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=23197&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=23197&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=23197&r=support Expected behavior: http://bugs.php.net/fix.php?id=23197&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=23197&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=23197&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=23197&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23197&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=23197&r=dst IIS Stability: http://bugs.php.net/fix.php?id=23197&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=23197&r=gnused

« previous php.bugs (#37634) next »