Forum Moderators: coopster

Message Too Old, No Replies

When hitting back, form info not passed on

Issue with $_GET

         

briesm

1:15 pm on Jul 5, 2005 (gmt 0)

10+ Year Member



Hey all. I have a form that will retrieve information from a database based on variables passed in a link...
i.e. [myaddress.php?firstTime=YES&order=17...]

Order=17 would pass on the order number which is used to connect to a MySQL database. Now, if I hit back on a browser after opening one form page up already and click on a new link, say ...&order=18 the form will load blank without anything filled in, so basically it seems like it didn't connect to the database or didn't make use of the order=18. I call upon these using a GET method. Anyone know what the problem might be?

I'm also using sessions as well.
Here's something that me be of issue, the form is filled in if this condition is met:
if ($_GET['firstTime']='YES' && $_SESSION['second']!= 'true')

so GET should obviously = YES, (It is set to NO later on in the script, and SESSION['second'] is set to true after the script is run once.

mcibor

2:35 pm on Jul 5, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Correct the if to:
if ($_GET['firstTime']=='YES' && $_SESSION['second']!= 'true')

And hitting back button doesn't help, because you have second set to true.
If this won't help then post here relevant code and we'll try to correct it.

Best regards
Michal Cibor