Trying to unset a $_SESSION variable from within a function can be problematic. Take a look at the help page for unset on php.net. This little snippet came from there and may help you...I hope.
Quote:
Here is another way to make 'unset' work with session variables from within a function :
PHP Code:
<?php function unsetSessionVariable ($sessionVariableName) { unset($GLOBALS[_SESSION][$sessionVariableName]); } ?>
|
Also, don't know if it is a typo, but in your post you have
PHP Code:
unset($SESSION['dest'],$dest);
Me thinks:
PHP Code:
unset($_SESSION['dest'],$dest);
would work a bit better. From what I gather in the help, the only way to
unset a global from within a function is if register_globals is 'ON'.
Good luck!