Jump to content


Expiring A Page

  • Please log in to reply
1 reply to this topic

#1 Miichael

  • Members
  • PipPip
  • Member
  • 16 posts

Posted 25 September 2006 - 05:21 PM


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.

#2 Jocka

  • Members
  • PipPipPip
  • Advanced Member
  • 344 posts
  • LocationDallas, Texas

Posted 25 September 2006 - 06:14 PM

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.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users