Results 1 to 2 of 2

Thread: Log Out Button

  1. #1
    Join Date
    Apr 2006
    Posts
    584
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Log Out Button

    Hi all,

    I am trying to make a logout button, I have no trouble with making it just link back to the index page, but how do I make it so that when the user clicks 'logout' it removes their session id and they need to login again?

  2. #2
    Join Date
    Jun 2007
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quite simple... you do a redirect to a page where you unset the relevant $_SESSION variables and after that you do a header("location: index.php"); exit;

    The users has to log in again.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •