On Fri, Mar 27, 2009 at 02:39:22PM -0700, Mary Anderson wrote:

> Hi all,
>    I use session variables to store values from one page to another on
> my website.
>    Alas, sometimes, but not always, the values persist from one
> invocation of the script to another!
>    Just how, exactly, do I make them go away when a user exits the
> program? I assume my users will not always be logging out explicitly.
>    Thanks.
>     maryfran

Unset the variable. Session variables (as far as I know) will persist as
long as the user keeps open his browser, or until they time out. But you
can do unset($_SESSION['myvar']) to unset a particular variable at any
time (assuming you have previously called session_start()).

Paul

-- 
Paul M. Foster

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to