AndreaD wrote:
I have a session variable called
$_SESSION['total'] the problem is I can't delete/reset it. I have tried
$_SESSION['total']= 0;
$_SESSION['total']= "";
I guess you didn't know/think of trying null:
$_SESSION['total'] = null;
...which has the same effect as using:
unset($_SESSION['total']); // as you have been told on at least 3 diff occasions ;-)
Not true. If you set it to null, it still exists...it's just null. If you unset it, the variable no longer exists.
$_SESSION['total'] = null; if ( isset ( $_SESSION['total'] ) ) { echo ( "Yes" ); } else { echo ( "No" ); }
unset ( $_SESSION['total'] ); if ( isset ( $_SESSION['total'] ) ) { echo ( "Yes" ); } else { echo ( "No" ); }
-- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 john@xxxxxxxxxxxx
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php