#33759 [Opn->Bgs]: single POST variable is corrupted
| From: | sniper@php.net | Date: | Mon, 18 Jul 2005 22:53:17 +0000 |
| Subject: | #33759 [Opn->Bgs]: single POST variable is corrupted | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-82104@lists.php.net to get a copy of this message | ||
ID: 33759
Updated by: sniper@php.net
Reported By: kyle dot grieser-c at iovation dot com
-Status: Open
+Status: Bogus
-Bug Type: Variables related
+Bug Type: Apache2 related
Operating System: linux
PHP Version: 4.3.11
New Comment:
It's just misconfiguration. Please don't report this as bug anymore.
Previous Comments:
------------------------------------------------------------------------
[2005-07-19 00:07:13] kyle dot grieser-c at iovation dot com
Description:
------------
A form of type POST that contains a single form element will corrupt
the incoming value.
What I get is this: formvalue="valueformvalue=value"
What I expect is this: formvalue="value"
Yuck! I found a very old bug report consistent with this from 2002 (
http://bugs.php.net/bug.php?id=18648 ) that
suggested adding a hidden
form element like this:
<input type=hidden name=bugfix>
This does indeed fix the problem, but seems like this bug has returned
in a recent version of PHP. Is there a fix?
I could not find any other bugs matching this report, and believe it
was reintroduced with 4.3.11.
Reproduce code:
---------------
<html>
<body>
<?php
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$formvalue = trim($_POST['formvalue']);
print "Recieved from Post: '". $formvalue."'";
}
?>
<form action="#" method="post">
<p>
FORM VALUE:<br><br><input type="text" name="formvalue"
value=""
size="50" maxlength="50"></td>
<input type= submit value=submit>
</p>
</form>
</body>
</html>
Expected result:
----------------
I expect this:
formvalue=value
Actual result:
--------------
I get this:
formvalue=valueformvalue=value
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=33759&edit=1