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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with page expiration

Status
Not open for further replies.

mns9939

Programmer
Nov 21, 2001
19
US
I have a web application written in php.
I have a main screen, where in the user selects a parameter and this brings out a list of item numbers.
by clicking on each item number, i can go to next page which displays the details of an item.
The problem is, when i hit the "Back" button on the browser to see the list of items in the previous page, i see a warning which says:
"PAGE HAS EXPIRED: The page you requested was created using information you submitted in a form. This page is no longer available. As a security precaution, Internet Explorer does not automatically resubmit your information for you."

I have removed header(cache-control: no cache) from the script.
But still, i have the same problem.

I need help at the earliest.

Thanks for any help.

 
I am going to guess that you are using a HTML form to pass the data to the next page. If you are, then you can change the form method from 'post' to 'get'. Making this change will pass all the variables & values from the form as part of the URL ... alowing the user to use the 'back button' on the browser.

But this can also be a problem if you are passing any secure data inside the form (so I would advise against using method='get' in security cases).

Hope this helps :)
 
There are techniques for using
Code:
POST
forms, and translating them dynamically into encrypted
Code:
GET
forms. Post here if you want info.

-Rob
 
There's a problem when deciding to use either POST or GET. I decide using POST when i need to insert/update data, and GET only for search functions. I decide this, cause when you do a search you want to go back and try another thing. With GET you don't have problems, but with POST you get always the security problem, and so, to avoid this, i use the GET method for all search functions. Anikin
Hugo Alexandre Dias
Web-Programmer
anikin_jedi@hotmail.com
 
Thank you all for your suggestions. Using GET solved the problem.
Rob,
Could you please send me information about the techniques for using POST forms, and translating them dynamically into encrypted GET forms?

Thanks,
Madhu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top