Session_unset - session_destroy issue
| From: | dealTek | Date: | Thu, 15 Aug 2013 18:16:32 +0000 |
| Subject: | Session_unset - session_destroy issue | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-321847@lists.php.net to get a copy of this message | ||
Hi all,
I am having trouble with session_destroy - session_unset and $_SESSION = array()... I am trying to
STOP and destroy all session vars......
with the simple code test below I would think it would echo test 1 BUT FAIL on test2
- however it shows both for me...
how do I UNSET - DESTROY SESSIONS?
<?php
session_start();
$_SESSION['var1'] = 'test1';
echo '<br /> test1 '. $_SESSION['var1'].' ';
session_unset();
session_destroy();
$_SESSION = array();
$_SESSION['var1'] = 'test2';
echo '<br /> test2 ' . $_SESSION['var1'];
?>
--
Thanks,
Dave - DealTek
dealtek@gmail.com
[db-3]