Jump to content


How to delete $_POST variables without deleting the session?

  • Please log in to reply
3 replies to this topic

#1 dantalion

  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 11 July 2006 - 04:08 PM


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?

#2 Daniel0

  • Staff Alumni
  • Advanced Member
  • 11,956 posts

Posted 11 July 2006 - 04:09 PM


Should do it.

#3 kenrbnsn

  • Staff Alumni
  • Advanced Member
  • 8,235 posts
  • LocationHillsborough, NJ, USA

Posted 11 July 2006 - 04:14 PM

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.


#4 ShogunWarrior

  • Members
  • PipPipPip
  • Advanced Member
  • 528 posts
  • LocationIreland

Posted 11 July 2006 - 07:45 PM

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.
<a href="http://www.daviddora...nmedia.com/">My New Site/Blog</a> | <a href="http://www.daviddora...m/check/">Check your page for broken links/images/scripts</a>

Zend Certified Engineer
Follow me on Twitter: http://twitter.com/davidd

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users