#21080 [Opn]: Single select in form returns wrong variable

From: Date: Wed, 18 Dec 2002 17:15:03 +0000
Subject: #21080 [Opn]: Single select in form returns wrong variable
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-27977@lists.php.net to get a copy of this message
ID: 21080 User updated by: D.I.Laurenson@ed.ac.uk Reported By: D.I.Laurenson@ed.ac.uk Status: Open Bug Type: Apache2 related Operating System: RedHat Linux 8.0 PHP Version: 4.2.2 New Comment: I should add that using a hidden input of the form <INPUT type="hidden" name="dummy" value="dummy"> in the form solves the problem! Previous Comments: ------------------------------------------------------------------------ [2002-12-18 11:13:02] D.I.Laurenson@ed.ac.uk The following HTML file should produce the result "Field 1" when it calls the PHP file. Instead the result is "Field 1select=Field 1". test.html: <html> <body> <form method = "post" action = "test.php"> <p><select name = "select"> <option selected = "selected">Field 1</option> <option>Field 2</option> </select> </p> <input type = "submit"> </form> </body> </html> test.php: <html> <body> <P> <?php print( $select ) ?> </P> </body> </html> I used the RedHat php distribution, php-4.2.2-8.0.5 without any recompilation or modification (other than to include the AddType application/x-httpd-php .php line to the httpd configuration). The apache distribution I am using is also native RedHat: httpd-2.0.40-11 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=21080&edit=1

« previous php.bugs (#27977) next »