#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    109
    Rep Power
    15
    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??

    Thanx
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 1999
    Location
    Perth, Western Australia
    Posts
    53
    Rep Power
    16
    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.
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Posts
    4
    Rep Power
    0
    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.
  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Posts
    4
    Rep Power
    0
    I dont know what i was thinking earlier. that should be unset($var)

    where $var is a variable you registered with session_register($var)

Similar Threads

  1. Replies: 2
    Last Post: February 2nd, 2004, 07:39 AM
  2. Replies: 4
    Last Post: January 28th, 2004, 08:29 AM
  3. PHP with UnixODBC
    By coder4hire in forum PHP Development
    Replies: 2
    Last Post: January 20th, 2004, 01:14 PM
  4. UnixODBC + PHP + Apache + Empress
    By coder4hire in forum Database Management
    Replies: 0
    Last Post: January 15th, 2004, 01:41 PM
  5. session control in php
    By scooby2000 in forum PHP Development
    Replies: 1
    Last Post: January 9th, 2004, 07:50 PM

IMN logo majestic logo threadwatch logo seochat tools logo