SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: logout button

  1. #1
    SitePoint Addict Garrett's Avatar
    Join Date
    Feb 2001
    Location
    England
    Posts
    352
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    logout button

    hello

    simple question, can anyone tell me how i can make a button refer to a php script.

    for example i've made a login section for my site and now i need to make the logout button but i have no idea how i can call the script to session_destroy().

    thanks in advance.
    Garrett Lynch

  2. #2
    Freelance Web Designer KeithMcL's Avatar
    Join Date
    Oct 1999
    Location
    Dublin, Ireland
    Posts
    1,125
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    On the page that has the logout button use form tags and have an action of logout.php and on it.

    Then in the logout.php page have the code to log the person out.

  3. #3
    SitePoint Enthusiast
    Join Date
    Jun 2000
    Posts
    47
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok understood!

    thanks!
    Garrett Lynch


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
  •