I have realized a php-session-management on my site. but i would also offer the possibility to a user to make a logoff! It's possible??
July 26th, 2000, 09:45 AM
I am also looking for the answer to the same question. I have users logged-in with their username stored in the PHP variable $PHP_AUTH_USER. I understand that it's not possible/allowed to unset($PHP_AUTH_USER). This being the case, what is the solution?
On page 505 of 'Professional PHP Programming' it states that one of the benefits of doing user authentication in PHP is that a user can "log out", but then it (annoyingly!) fails to elaborate.
Thanks. I am using PHP3 so any PHP4 solutions are no good to me at the moment.
July 27th, 2000, 10:20 AM
I believe all that is required is to unregister the session variables you registered with the unregister() function. Call unregister($varname) for each variable you registered.
July 27th, 2000, 06:36 PM
I dont know what i was thinking earlier. that should be unset($var)
where $var is a variable you registered with session_register($var)