#10450 [Com]: Submitting a form to same php file as the form is in, with a query string
| From: | heel-platform764 at hotmail dot com | Date: | Tue, 20 Jul 2004 15:01:15 +0000 |
| Subject: | #10450 [Com]: Submitting a form to same php file as the form is in, with a query string | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-62801@lists.php.net to get a copy of this message | ||
ID: 10450
Comment by: heel-platform764 at hotmail dot com
Reported By: Robbo at Skins dot nu
Status: Bogus
Bug Type: Reproducible Crash
Operating System: Windows Me
PHP Version: 4.0.4pl1
New Comment:
<a href=http://o-slim-indiasexthum.da.ru>platform
heel</a>
Previous Comments:
------------------------------------------------------------------------
[2001-04-27 10:16:17] derick@php.net
NAPB (Not a PHP Bug)
------------------------------------------------------------------------
[2001-04-27 10:09:27] Robbo at Skins dot nu
Ok
I've worked out now, after many hours, that it is actually an IE6beta
problem....
MS BS...
------------------------------------------------------------------------
[2001-04-23 08:03:50] Robbo at Skins dot nu
refer to
http://forums.devshed.com/showthread.php?threadid=13850&forumid=5&goto=newpost
for more detailed explanation and what I've tried.
This shows that on linux with 4.03pl1 it seems to work... but it does
not on mine (windows millennium, php4.04pl1)
------------------------------------------------------------------------
[2001-04-23 04:28:58] Robbo at Skins dot nu
I have a php4 file called temp.php with the following *exact*
contents:
<?
mysql_connect("localhost", "root", "Robbo567");
if (!isset($frmAction)) { // If data has not been submitted
?><html><head></head><body>
<form action="temp.php" method="post">
<input type="hidden" name="frmAction" value="submitted">
<input type="submit">
</body></html>
<?
}
else {
?>Form has been submitted<?
}
?>
When this file is executed, it works perfectly, unless you supply it
with a query string (eg temp.php?hello). As soon as a query string is
supplied, PHP4 crashes and a 500 error is produced.
I have norrowed it down to two workarounds, comment out the
mysql_connect line and it works fine, or change the form method to get
and it works fine... but as is it should also work fine.... alas it
does not!!
------------------------------------------------------------------------
[2001-04-23 03:30:20] Robbo at Skins dot nu
I have a single file that does both displaying a form if nothing has
been submitted, or process data if data has been submitted. When the
file is called with a query string (eg, file.php?hello) the form is
displayed properly (as it should be), but as soon as I hit the submit
button after completing the form, PHP crashes and I get an error 500
(internal server error).
If I remove the query string, everything works fine (but I need the
query string for a seperate function).
This only happens when the form action is post, it works fine with get.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=10450&edit=1