Web :: General :: Knowledge Base : how to properly destroy a PHP session ? and with cookie ? |
|||
| By: VGR |
Date: 17/07/2006 08:42:57 |
Points: 0 | Status: Answered Quality : Excellent |
|
//VGR REM this is code copy-pasted bt AES from www.php.net/manual/en // reset session $name=session_name(); if (isset($_COOKIE[$name])) { setcookie($name, '', time()-42000, '/'); } unset($_COOKIE[$name]); // Finally, destroy the session. session_destroy(); unset($_SESSION); unset($_COOKIE[$name]); // if needed, get new session id afterwards, doing a session_start() |
|||
|
Do register to be able to answer |
|||
| Add This Article To: | |||
| |
|
|
|
| |
|
|
|








