Re: Ending session

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At 05:30 PM 12/9/2005, Ron Piggott (PHP) wrote:
How do you actually end $_session variables so the session actually
ends?

I found the session_write_close() command.  I am not sure if this is the
correct command or not.

One prime example I am using is a $_session variable to track which user
account is active.  I want to have a log off button which closes the
session off.

Ron

Ron,

This may be overkill, but on a failed login I did not want the ckval variable hanging around in any form, hence:


        session_unregister( "ckval" );
        unset($_SESSION[ckval]);
        unset( $ckval );
        session_destroy();

Hope this helps - Miles
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux