Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 6 of 6
  1. #1
    Senior Member mossoi's Avatar
    Join Date
    Apr 2003
    Location
    Englandshire, United Kingdomsville y'all!
    Posts
    1,111
    Member #
    1206
    Liked
    1 times
    I've got a page that resets the cookie values for a member's login credentials:

    Code:
    <?
    setcookie("verified","no");
    setcookie("member","no");
    ?>
    <html>
    <head>
    <title>Test Page</title>
    <link rel='stylesheet' href='/style.css' type='text/css'>
    </head>
    <body>
    <script language="JavaScript">
    window.location.href="index.php";
    </script>
    </body>
    </html>
    The problem is that it works fine in IE and the user is logged out but in Mozilla the user remains logged in.

    Any ideas?

  2.  

  3. #2
    Senior Member skrlin's Avatar
    Join Date
    Apr 2003
    Location
    Illinois
    Posts
    562
    Member #
    1063
    Try setting a expires value for the cookie
    From PHP.net
    The time the cookie expires. This is a unix timestamp so is in number of seconds since the epoch. In otherwords, you'll most likely set this with the time() function plus the number of seconds before you want it to expire. Or you might use mktime().

    time()+60*60*24*30 will set the cookie to expire in 30 days. If not set, the cookie will expire at the end of the session (when the browser closes).
    That could be your problem, or maybe mozilla is set to not accept cookies?
    - Brian

  4. #3
    Senior Member mossoi's Avatar
    Join Date
    Apr 2003
    Location
    Englandshire, United Kingdomsville y'all!
    Posts
    1,111
    Member #
    1206
    Liked
    1 times
    The actual version I'm using has an expiration date, I just removed it while I was testing and then posted it. Mozilla is allowing the cookie to be set when the user logs in so it is creating at least one. Is it feasible that the cookie is somehow read-only?

  5. #4
    Senior Member mossoi's Avatar
    Join Date
    Apr 2003
    Location
    Englandshire, United Kingdomsville y'all!
    Posts
    1,111
    Member #
    1206
    Liked
    1 times
    Seemed to have fixed it. There were two cookies with the same name. I deleted them and started again and it was fine.

    I'm not sure why it should have created two, maybe because I'm testing on Moz, Moz Firebird and Netscape at the same time?

  6. #5
    Senior Member skrlin's Avatar
    Join Date
    Apr 2003
    Location
    Illinois
    Posts
    562
    Member #
    1063
    That could be it.
    - Brian

  7. #6
    Senior Member Brak's Avatar
    Join Date
    Apr 2003
    Location
    San Francisco, CA
    Posts
    3,413
    Member #
    1217
    Liked
    2 times
    moz and moz firebird would be having issues since they use the same profile... I'd suggest creating a new profile for one of the programs while testing just to clear things up.
    Kyle Neath: Rockstar extraordinare
    The blog | The poetry site | The Spore site


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 07:59 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com