Jump to content

Cookies Not Being Set


Darkness

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!

Link to comment
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.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...