#33759 [Bgs]: single POST variable is corrupted
| From: | kyle dot grieser-c at iovation dot com | Date: | Mon, 18 Jul 2005 23:11:36 +0000 |
| Subject: | #33759 [Bgs]: single POST variable is corrupted | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-82106@lists.php.net to get a copy of this message | ||
ID: 33759
User updated by: kyle dot grieser-c at iovation dot com
Reported By: kyle dot grieser-c at iovation dot com
Status: Bogus
Bug Type: Apache2 related
Operating System: linux
PHP Version: 4.3.11
New Comment:
If this is indeed misconfiguration, some information on how/why it is
misconfigured sure would be nice.
Your response, as is, is frustrating and USELESS!
Previous Comments:
------------------------------------------------------------------------
[2005-07-19 00:53:16] sniper@php.net
It's just misconfiguration. Please don't report this as bug anymore.
------------------------------------------------------------------------
[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