note 24457 modified in function.unset by jmcastagnetto

From: Date: Fri, 16 Aug 2002 19:32:44 +0000
Subject: note 24457 modified in function.unset by jmcastagnetto
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-35151@lists.php.net to get a copy of this message
[Editor's note: this note is partially correct, you can destroy session a variable using session_unregister(), and then you can safely unset() it.] If you unset session variables with unset($_SESSION['foo']) the variables will only be unset from the $_SESSION array inside the calling script. Calling isset($_SESSION['foo']) on the next page will return true! It seems that it is impossible to delete only certain session variables permanently. You can, however, delete all variables with session_unset(). --was-- If you unset session variables with unset($_SESSION['foo']) the variables will only be unset from the $_SESSION array inside the calling script. Calling isset($_SESSION['foo']) on the next page will return true! It seems that it is impossible to delete only certain session variables permanently. You can, however, delete all variables with session_unset(). http://www.php.net/manual/en/function.unset.php

« previous php.notes (#35151) next »