Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Oct 2003
    Location
    Australia
    Posts
    112
    Thanks
    0
    Thanked 0 Times in 0 Posts

    weird cookie problem

    I'm trying to use a simple cookie for a login and logout script.

    I can login fine, but I cannot logout at all. I tried removing the cookie the usual way but its not doing it. The cookie is still stored in my browser.

    PHP Code:
    // login.php
        
    setcookie('verifieduser',$username,time()+9600,'/');
        
    header('location: index.php');
        exit; 
    PHP Code:
    //logout.php
    setcookie('verifieduser','',time()-9600,'/');
        
    header('location: index.php');
        exit; 
    May I missing something obvious? Thanks for your time.

  • #2
    raf
    raf is offline
    Master Coder
    Join Date
    Jul 2002
    Posts
    6,589
    Thanks
    0
    Thanked 0 Times in 0 Posts
    how do you know it is still there?

    did you close all browserwindows and then checked the cookiedirectory? Did you remove all cookies that were already set from that domain before you tried setting and deleting a new cookie?
    Posting guidelines I use to see if I will spend time to answer your question : http://www.catb.org/~esr/faqs/smart-questions.html


  •  

    Posting Permissions

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