Jump to content

Cookie Help


LemonInflux

Recommended Posts

Is there a way to have a cookie that deletes itself when you leave the site. IE: You log into an index.php. You then view add.php, delete.php, view.php, search.php, finishing off with member.php?userid=12, then you leave the site. Is there a way to set a cookie that doesn't expire until you leave the site?

Link to comment
https://forums.phpfreaks.com/topic/70495-cookie-help/
Share on other sites

Look into sessions. Sessions are only valid while the user is on the site. As soon as you leave the site your session will be invalid. Sessions are the same as cookies except all data is stored in a session file on the server rather than on the users computer.

Link to comment
https://forums.phpfreaks.com/topic/70495-cookie-help/#findComment-354164
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.