Forum Moderators: coopster
If I am correct, session_destroy(); will get rid of the session data, and I use this when the form has been submitted successfully. The question is, if the user decides that he/she doesn't want to go back and do it until they get it right (and hence call session_destroy();) what happens to those variables. Do they get erased by default and you need to write functions to actually save them to a file or database or is it the other way around where I need to modify my code to delete them?
from PHP Session handling functions [ca3.php.net]
There is a setting in php.ini for
session.gc_maxlifetime
session.gc_maxlifetime specifies the number of seconds after which data will be seen as 'garbage' and cleaned up.