Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

$_REQUEST makes browser (Opera) halt?

Status
Not open for further replies.

LaundroMat

Programmer
Joined
Dec 2, 2003
Messages
67
Location
BE
Hmm.

In order to produce dynamic pages, I add variables to my URLs (e.g.: "index.php?chapter=2"). The chapter variable is read through $_REQUEST.

Now, I would like to create a form (say: form.php) that sends what has been inputted to index.php?chapter=2. In form.php, I've created a hidden field:
Code:
<input type=&quot;hidden&quot; name=&quot;chapter&quot; value=&quot;2&quot;>

In order to test, I've added
Code:
print_r($_REQUEST)
on index.php. At first, this returns the desired values.

But!

Upon refreshing the page (ie index.php), Opera hangs at the beginning of the page (ie: it does not crash, it simply stops loading the page). IE on the other hand pops up a requester stating I should resubmit my data (coming from form.php) if I want to refresh.

Anyone?
 
Oh, and by the way, after a while Opera displays an &quot;Error 400 - Bad Request&quot;. (I'm using Abyss Web Server btw).
 
OK, when you're using queries you have to be careful of refreshing pages.

Once you've submitted that form, and you've printed out that info, that submitted information is no longer usable for another page, unless you either create a session for the user, in which you store this info, or you create a cookie with the data.
 
So, what you're saying is that this behaviour would be the same if I put it all in $_POST variables?

This means that it's in fact Opera's fault... it should ask me whether I want to resubmit my data, right?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top