Forum Moderators: coopster & phranque

Message Too Old, No Replies

This Page has Expired!

A question.....

         

dreamcatcher

11:09 pm on Apr 14, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I`ve written my first script using a database and session handling. I notice that when you click the back button on some of the pages, you sometimes get a message saying "This page has expired". If you refresh it sends the info again. Is there any way of stopping that happening?

Thanks.

:)

DrDoc

11:33 pm on Apr 14, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Not after submitting a form, there isn't...

grifter

2:00 am on Apr 15, 2003 (gmt 0)

10+ Year Member



"This page has expired" should *stop* a user from being able to post the same form data again.

Since you are using session handling, and presumably a database, you should set a flag that no more user input is allowed, so that second submit has no effect. Or, update the information based on the session identifier.

If what you want is to have that form expire again, you may be able to set headers accordingly. In PHP, I had this lying around:

header ("Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0");

That's probably wrong--do some searches in google or google groups for Cache-Control.

dreamcatcher

8:49 pm on Apr 15, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks for info guys!

:)