SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Enthusiast
    Join Date
    Jul 2001
    Location
    Texas
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    cookies (not edible)

    I'm using cookies on my site and I have it where it sets the cookies perfect, but my only problem is that users can't logout. I've never had to mess with cookies before so I'm pretty lost. I'm guessing that what I'm gonna have to do is find the cookie on their harddrive and delete it to log them out, but I'm not sure how this would be done. Can anyone help? Thanks.


    BTW, this is all being written in php.
    Mark -
    www.magicscripts.net

  2. #2
    SitePoint Zealot sonique's Avatar
    Join Date
    Sep 2001
    Location
    Missouri [U.S.]
    Posts
    135
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    eh have a log out link that takes them to a page has cookie set with the with just the name set....that should erase the cookie.....then have a redirection script that will send the to another page afterwards...
    jmulder[THE MENTOR]'s nice guy online!
    Rig: AMD Athlon 800mhz; 384mb SDRam; 32mb nVidia @ 1024x768; ie 6; Windows ME; 15 gig; Cd-RW

  3. #3
    Making a better wheel silver trophy DR_LaRRY_PEpPeR's Avatar
    Join Date
    Jul 2001
    Location
    Missouri
    Posts
    3,428
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i believe you set a cookie with an expiration date in the past (a week, year, whatever) to delete it.
    - Matt ** Ignore old signature for now... **
    Dr.BB - Highly optimized to be 2-3x faster than the "Big 3."
    "Do not enclose numeric values in quotes -- that is very non-standard and will only work on MySQL." - MattR

  4. #4
    Happy Holidays !! Paul S's Avatar
    Join Date
    Mar 2001
    Location
    Mexico
    Posts
    1,287
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You also can set a small lifetime for the cookies, around 20 min
    If you are using session cookies, they will last until the user closes his/her browser.

  5. #5
    Free me php klassicd's Avatar
    Join Date
    Sep 2001
    Location
    San Diego
    Posts
    509
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    if

    you leave the date blank when you set the cookie i will erase it self when they close the browser.

  6. #6
    SitePoint Enthusiast
    Join Date
    Jul 2001
    Location
    Texas
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    jeez, thanks for the quick replies. Let me go give it a try.


    btw, it would be prett pointless to have it set to an expiration date and rely on that. Some people who live together go to the same site, and use the same computer, so if it all on the expiration date then the users would either have to clear cookies to log in under their username or wait a very long time.
    Mark -
    www.magicscripts.net


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
  •