I am trying to clear all info in a session so that a user can start over from scratch, but I don't want to make them login again. I am currently passing from a form that asks if a user wants to start over to a page that clears all session vars. In the first page, I specify a page in a session variable called $_SESSION['redirect'], so that when all is said and done, the next page knows where to redirect to.
The clear data page puts all of the session vars into normal vars, like so...
$varname = $_SESSION['varname'];
so that when I run session_unset(); I can still access the vars.
After unsetting the vars, I reset the vars by running the reverse code listed above, putting the normal vars back into session vars.
After all of this, I can't seem to get it to work. Nothing but undefined var errors. Anyone have a solution?