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 |
|||
©2010 These pages are served without commercial sponsorship. (No popup ads, etc...). Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE.
Please DO link to this page!








