Jump to content

Help with sessions/cookies


LooieENG

Recommended Posts

I have a login script working perfectly, but it only uses sessions. How do I use cookies? Is it as simple as setting a cookie with the session ID?

 

I want it to let the user stay logged in forever.

 

Thanks

 

Is this right?

 

setcookie("loggedIn",session_id(), time()+99999*99999*99999);

Link to comment
https://forums.phpfreaks.com/topic/105067-help-with-sessionscookies/
Share on other sites

Archived

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

×
×
  • 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.