1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Cookie troubles with Firefox

Discussion in 'PHP' started by James McMurray, Mar 30, 2008.

  1. #1
    When I call setcookie(cookiename, ""), firefox does not destroy the cookie. IE does. Is this a browser thing or is there something I can do with php or javascript to force the cookie to delete instantly?

    Thanks!
     
    James McMurray, Mar 30, 2008 IP
  2. forumtyrone

    forumtyrone Peon

    Messages:
    577
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Firefox never failed me in removing cookies. Are you sure you are doing the right thing? What version is your firefox?
     
    forumtyrone, Mar 30, 2008 IP
  3. James McMurray

    James McMurray Peon

    Messages:
    52
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    firefox 2.0.0.13

    To set the cookies: setcookie ("USERNAME", $_POST['username'], $expires, '/'); // $expires is either 0 or 10 years from time()

    To delete them: setcookie ("USERNAME", "", time() - 3600); // same code as in the php.net manual
     
    James McMurray, Mar 30, 2008 IP