Jump to content

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

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.