note 105477 deleted from faq.using by thiago
| From: | thiago@php.net | Date: | Sun, 21 Aug 2011 06:49:19 +0000 |
| Subject: | note 105477 deleted from faq.using by thiago | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-182621@lists.php.net to get a copy of this message | ||
Note Submitter: Ganesh
----
Problem destroying session...
<?php
session_start();
if (ini_get('register_globals'))
{
foreach ($_SESSION as $key=>$value)
{
if (isset($GLOBALS[$key]))
unset($GLOBALS[$key]);
}
}
$_SESSION['login_user']="PHP";
?>
<html>
<head>
</head>
<body>
<?php
echo $_SESSION['login_user'];
session_destroy();
echo $_SESSION['login_user'];
?>
</body>
</html>
After session_destroy(), its still returning $_SESSION['login_user'] as 'PHP'.
I'm running this script locally. Anyone has any idea?