Jump to content


This topic is now archived and is closed to further replies.


Expiring A Page

Recommended Posts


I am pretty sure that this is not a strictly php question, but I thought I'd ask as my research is coming up empty.

I have a case where the user fills out an order entry from and then goes to the next page to verfiy the order.  At that point the user can submit the order or revise the order.

I am assuming that the user clicks the browser back key to return to the previous page.

What I would like to do is have the order entry form expire after a given time.  By this I mean if the user tries to use the back key to return to the order form after 5 minutes, for example, they will see a message that the page has expired and they have to start over, but if they return in under 5 minutes the page will remain intact and they can modify as needed and then resubmit.

I have not been able to find any information that is helpful.  If someone could point me in the right direction I would appreciate it.

Thank you.

Share this post

Link to post
Share on other sites
u could use time and date. You can do anything like this:

1. Save the time/form information in a session.
2. Save the time/form information in your database.

the first option would probably be easier. On your form page just have it first try to find the session. If it finds the session and the time was more than 5 minutes ago, erase session and start over. If not, show the info. If there is no session, then create one and show the form with the information.

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.