Jump to content

Firefox cookie only on second request


FrogNL

Recommended Posts

I have quite a big problem when a user visits a website using Firefox. When a user logs in and checks the "remember me" checkbox a cookie is stored using this code:

 

[setcookie('LooktureAuth', $cookie, time() + 2678400, '/');/code]

This works absolutely perfect in Safari, but when I try to access this cookie in Firefox (using $_COOKIE['LooktureAuth'], the cookie is not showed. When the user go's to an other page though, the cookie is showed. Does anyone have an idea why this is happening?

Thanks on forehand!

Link to comment
Share on other sites

I just saw I forgot to end the code tag, so the correct post below:

 

I have quite a big problem when a user visits a website using Firefox. When a user logs in and checks the "remember me" checkbox a cookie is stored using this code:

 

[setcookie('LooktureAuth', $cookie, time() + 2678400, '/');

 

This works absolutely perfect in Safari, but when I try to access this cookie in Firefox (using $_COOKIE['LooktureAuth']), the cookie is not showed. When the user go's to an other page though, the cookie is showed. Does anyone have an idea why this is happening?

 

Thanks on forehand!

Link to comment
Share on other sites

Well, i guess not since safari is working. Does IE work ?

Because this weird issue, i think firefox does delete cookies automatically when closed or whatsoever. Check your brower settings please and i do need your php code

 

Do you have a login for me to use ?

Link to comment
Share on other sites

Thanks for your replies!

 

I set the cookie when the user is logging in on login.php using the following code:

 

setcookie('LooktureAuth', $cookie, time() + 2678400, '/');

 

and read it using the following code:

 

$auth = $_COOKIE['LooktureAuth'];

 

Any idea?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.