Jump to content

Archived

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

dantalion

How to delete $_POST variables without deleting the session?

Recommended Posts

Hi,

Is there a method for deleting $_POST variables from a session (so that if a page is reloaded they will not exist anymore) without destroying the entire session?

Share this post


Link to post
Share on other sites
Deleting $_POST variables will not affect what happens on reload, that is controled by the browser. If you reload a page that has a form, the form data is resent and the $_POST variables will be reloaded. You need logic in your script that will act accordingly if a page is reloaded.

Ken

Share this post


Link to post
Share on other sites
Usually the best way to do it is:
Form.html (send to process page) -> Process.php (Redirect to "Thank You") -> ThankYou.html

That way, they are moved along the chain to a thank you/email sent etc. and can't reload.

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.