how can i expire the submitted page using session.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
awdhut
Forum Newbie
Posts: 5
Joined: Fri Oct 30, 2009 11:34 am

how can i expire the submitted page using session.

Post by awdhut »

hi,
i'm new to php world.
i'm using "post" method.
when i submit it,data goes to database successfully.
BUT when i click the back button of browser(IE) the previous
page will appear.
how can i expire the submitted page using session.
please send the code.
User avatar
McInfo
DevNet Resident
Posts: 1532
Joined: Wed Apr 01, 2009 1:31 pm

Re: how can i expire the submitted page using session.

Post by McInfo »

When the form page is requested, check for the existence of a session variable (like $_SESSION['HasBeenSubmitted']). If the flag (variable) is not set, display the page. If the flag is set, do something else. Set the flag (assign it a value) when processing the submitted form data.

Edit: This post was recovered from search engine cache.
Last edited by McInfo on Thu Jun 17, 2010 1:10 pm, edited 1 time in total.
awdhut
Forum Newbie
Posts: 5
Joined: Fri Oct 30, 2009 11:34 am

Re: how can i expire the submitted page using session.

Post by awdhut »

Thanks sir,
I have done it.
Thank you very much.
Post Reply