|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21080 Single select in form returns wrong variable
Submitted: 2002-12-18 11:13 UTC Modified: 2002-12-18 11:15 UTC
From: D dot I dot Laurenson at ed dot ac dot uk Assigned:
Status: Not a bug Package: Apache2 related
PHP Version: 4.2.2 OS: RedHat Linux 8.0
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: D dot I dot Laurenson at ed dot ac dot uk
New email:
PHP Version: OS:


 [2002-12-18 11:13 UTC] D dot I dot Laurenson at ed dot ac dot 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".


      <form method = "post" action = "test.php">
         <p><select name = "select">
               <option selected = "selected">Field 1</option>
               <option>Field 2</option>

         <input type = "submit">


         print( $select )

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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-12-18 11:15 UTC] D dot I dot Laurenson at ed dot ac dot uk
I should add that using a hidden input of the form
<INPUT type="hidden" name="dummy" value="dummy">
in the form solves the problem!
 [2002-12-18 11:15 UTC]
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments
to the existing bug instead.

Thank you for your interest in PHP.

Duplication of #18648 (see
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Mar 02 01:01:28 2024 UTC