ID: 32601
User updated by: sarah dot lee at seh dot ox dot ac dot uk
Reported By: sarah dot lee at seh dot ox dot ac dot uk
-Status: Bogus
+Status: Open
Bug Type: Apache related
Operating System: Windows XP
PHP Version: 4.3.9
New Comment:
This was marked bogus, but was my last comment taken into account?
Previous Comments:
------------------------------------------------------------------------
[2005-04-06 19:08:29] sarah dot lee at seh dot ox dot ac dot uk
Sorry to confuse, but I've just discovered someting new.
When simply pressing enter:
array(2) { ["ptitle"]=> string(0) "" ["submit"]=> string(6) "Submit" }
When pressing enter and the cursor is in the box (as is the norm when
you have just finished typing something):
array(1) { ["ptitle"]=> string(0) "" }
------------------------------------------------------------------------
[2005-04-06 18:19:16] [EMAIL PROTECTED]
There we go. You're getting just correct input.
No bug here. (ALWAYS use the superglobals $_GET, $_POST, etc)
------------------------------------------------------------------------
[2005-04-06 14:26:54] sarah dot lee at seh dot ox dot ac dot uk
Sorry, my mistake - I misread your question.
Output is:
array(2) { ["ptitle"]=> string(0) "" ["submit"]=> string(6) "Submit" }
------------------------------------------------------------------------
[2005-04-06 14:23:08] sarah dot lee at seh dot ox dot ac dot uk
The result is:
array(1) { ["ptitle"]=> string(4) "text" }
I found a work-around last night, using "if ($_POST) { .. }" rather
than "if ($submit) { .. }", but it still doesn't explain why $submit is
not recognised.
------------------------------------------------------------------------
[2005-04-06 13:51:12] [EMAIL PROTECTED]
What does this output when you press simply enter:
test.php:
<form method="POST" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<input type="text" size="30" maxsize="50" name="ptitle" value="">
<input type="submit" name="submit" value="Submit">
</form>
<?php var_dump($_POST); ?>
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/32601
--
Edit this bug report at http://bugs.php.net/?id=32601&edit=1