Re: Ending session
| From: | Miles Thompson | Date: | Fri, 09 Dec 2005 22:44:57 +0000 |
| Subject: | Re: Ending session | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-40834@lists.php.net to get a copy of this message | ||
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. RonRon, 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