Jump to content
Sign in to follow this  
Darkness

Cookies Not Being Set

Recommended Posts

Some of my users cannot login, as the cookie does not set correctly. I'm not really sure why. This is the code I use to define the cookie:

setcookie("User_ID", "$U_UserID", time()+9999);

Is there anything wrong with that?Thanks!

Share this post


Link to post
Share on other sites

Since a cookie set like this is available only at the next page load, if you use this func after you've already passed some HTML, it won't be available yet. Like headers, it must go before the HTML. A possibility.

Share this post


Link to post
Share on other sites

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.   Paste as plain text instead

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...