php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17463 Form Error
Submitted: 2002-05-27 14:50 UTC Modified: 2002-05-27 15:18 UTC
From: sarev0k at bigfoot dot com Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 4.2.0 OS: All
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: sarev0k at bigfoot dot com
New email:
PHP Version: OS:

 

 [2002-05-27 14:50 UTC] sarev0k at bigfoot dot com
http://seazbounty.castledragmire.com/bugs/formbug.php reproduces the problem.
To produce the problem, type in anything to the textbox and press enter.  You will notice nothing happens, now type something in and click the submit button.  It now works.  I have reproduced this bug on windows and linux platforms, so it is not a browser problem.

Here's that scripts source code:
<?php
  //formbug.php
  
  print $_SERVER["SERVER_SIGNATURE"]."\n";
  
  if(!isset($_POST["submit"]))
  {
    print "type in anything to the text box and press enter";
    print "<form name=login action=".$_SERVER["PHP_SELF"]." method=post>\n";
    print "<input type=text name=blah>\n";
    print "<input type=submit name=submit value=submit>\n";
    print "</form>\n";
  }
  else
  {
    print "Pressing enter didn't work did it!<br>";
    print "Bug is solved when having more than one field in a form, other than the submit button.";
  }
?>

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-05-27 15:18 UTC] derick@php.net
This is not a bug in PHP, but more a browser issue. Some browsers (IE5 being one) simply don't set the sumbit field if you press enter.
And you are already giving the solution, add a hidden field and check for that on submission.

Derick
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Sep 20 11:00:01 2025 UTC