I think I found the answer, but please feel free to still add anything to this: session_destroy() terminates the session, which cannot be started up again until the browser is restarted... sooo... I just removed session_destroy, and settled for using sess_unset() to log out of a session. using this method the session is still open, and the session variables are still registered. since they are still registered, they can still be used on the chance that I log in again, correct? seems to be working fine, but if there are caveats, feel free to let me know. thanks! ----- Original Message ----- From: "Jason Bell" <[EMAIL PROTECTED]> To: "PHP Users" <[EMAIL PROTECTED]> Sent: Thursday, September 13, 2001 3:12 PM Subject: [PHP] session_unset & session_destroy being called outside of logic. Hello all! I am switching a variable to check if a user is logging in or logging out. If the value of the variable is logout, I want the user to logout, i.e: case logout: session_unset(); session_destroy(); $AuthErr = "<FONT SIZE=-1 COLOR=red>Session Terminated</FONT>"; break; What is happening, is after the user authenticates and logs in, everything looks good, but whenever the user follows any link, the session gets unset and destroyed. I know that the variable that holds the logout value isn't even present, so I'm not sure how it's getting called... has anyone experienced this before? How did you get around it? Thanks! Jason -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]