Clearing PHP session info after form submission

A few users have had scenarios where they've wanted to solicit multiple, subsequent form submissions - in other words, have people submit the same form over and over with different information.  To do this you'll need to use redirect success pages and add a bit of php code to make sure all the previously entered info is clear and a new php session is created.

On your SUCCESS page, simply go to the header of the page inspector and add this code:

// Initialize the session. 

// If you are using session_name("something"), don't forget it now!

// Unset all of the session variables. 

$_SESSION = array();
Have more questions? Submit a request


Article is closed for comments.
Powered by Zendesk