Jump to content

Expiring A Page


Miichael

Recommended Posts

Hello

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.
Link to comment
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.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.