php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #33104 POST Method on HTML form performs GET Method
Submitted: 2005-05-22 21:39 UTC Modified: 2005-05-22 22:30 UTC
From: paigrande at yahoo dot com Assigned:
Status: Not a bug Package: *URL Functions
PHP Version: 5.0.4 OS: Win 2003
Private report: No CVE-ID: None
 [2005-05-22 21:39 UTC] paigrande at yahoo dot com
Description:
------------
Just learning PHP. I have simple HTML form performing a POST to a PHP script which retrieves the posted values from $_POST variable. I get no results. If I look in $_GET without changing HTML form, I have values. See example code.

My setup:
Windows 2003 Enterprise
Apache 2.0.54-win32-x86-no ssl
jakarta-tomcat 5.5.9
jakarta-connectors jk 2.0.4 win32 apache 2.0.49
PHP 5.0.4 win32

Reproduce code:
---------------
<HTML>
<head>
<title>Test Search Form</title>
</head>
<body>
<FORM ACTION="post.php" METHOD=?POST?>
<table>
<tr><td>Date: <input type="text" name="eDate"></td></tr>
<tr><td><input name="Submit" type="submit" value="Search"></tr></td>
</table>
</FORM>
</body>
</html>

post.php:
<?PHP
print_r($_POST['eDate']);
?>

Expected result:
----------------
I expect the date I enter on the HTML form to be printed.

Actual result:
--------------
This URL: 
http://localhost/test/post.php?eDate=1999-09-09&Submit=Search

Error message:
[client 127.0.0.1] PHP Notice:  Undefined index:  eDate in C:\\Program Files\\Apache Group\\Apache2\\htdocs\\test\\post.php on line 3, referer: http://localhost/test/test_form.html

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-05-22 22:30 UTC] derick@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

You use curly quotes around POST in your form, that's obviously not working. Not a bug in PHP.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 12:01:31 2024 UTC