#17739 [Com]: form select multiple returns double values

From: Date: Sun, 29 Sep 2002 19:10:17 +0000
Subject: #17739 [Com]: form select multiple returns double values
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-20684@lists.php.net to get a copy of this message
ID: 17739 Comment by: surface@surface.hu Reported By: php@remove.gustl.net Status: Bogus Bug Type: Unknown/Other Function Operating System: all PHP Version: 4.2.1 New Comment: The same happened with me, but the files which was uploaded duplicated, but the others didn't. Those was also corrupted, two variables bacame three. Previous Comments: ------------------------------------------------------------------------ [2002-06-13 13:27:11] sesser@php.net It happens because some guy at Microsoft was drunken. Infact you are triggering a situation where the IE 5.0 simply sends every form field 2 times. ------------------------------------------------------------------------ [2002-06-13 12:05:00] php@remove.gustl.net this may be true, but do you know how this happens or how I can analyze the problem, because I don't get $HTTP_RAW_POST_DATA when enctype is set to "multipart/form-data", even when I set always_populate_raw_post_data = On. My workarround for now is to put the select post results through array_unique (), ------------------------------------------------------------------------ [2002-06-13 10:27:03] sander@php.net If it only happens with IE, or one version of IE, then it's not a bug in PHP but yet another bug in IE. ------------------------------------------------------------------------ [2002-06-13 07:35:51] php@remove.gustl.net A very special (maybe browser only) problem, when I post a form under following conditions: 1. form enctype="multipart/form-data" 2. <select ..> or <select multiple..> with unicode-values 3. and a file upload 4. only from IE 5.0 (30% of my visitors), other browsers ok 5. and you select a value with unicodes the returned array contains the selected values twice, like: ["currency"]=> array(2) { [0]=> string(12) "€ Euro" [1]=> string(12) "€ Euro" } the script (www.gustl.at/testmultisel.php): <html> <head> <title>select multiple</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <form method="post" enctype="multipart/form-data"> which are your favorite currencies <select size="2" multiple name="currency[]"> <option>&#8364; Euro</option> <option>$ Dollar</option> </select><br> and send a file <input type="file" name="uploadedfile"><br> <input type="submit"> </form> <?php echo "<br>post: <listing>"; var_dump ($_POST); echo "</listing>"; ?> </body> </html> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=17739&edit=1

« previous php.bugs (#20684) next »