Re: Wizard and closing its window
| From: | Marko Vukovic' | Date: | Mon, 11 Sep 2000 10:25:04 +0000 |
| Subject: | Re: Wizard and closing its window | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-16144@lists.php.net to get a copy of this message | ||
Radu Filip wrote:
>
> So, how to capture the event that occurs on closing a window from
> "x" button and preventing variables to remain registered? Any ideea may
> be usefull.
>
Do a session_start(); followed by a session_destroy(); on the first step.
This will kill any existing session and a new one will be created on the first session_register();
You could also register a variable for each step eg. $step="1" etc... and if the user
closes a window and then tries again,
the script will do: if ($step != "") { session_destroy(); header ("Location:
step1.php"); }
Ciao,
--
Marko.