Jump to content

Cookies don't expire


Manixat

Recommended Posts

Hello freaks,

 

I haven't thought I would ever need to ask about something like this but, oh well..

I was adding a "remember me" function to my log in system and as usual if the remember me box is not checked then the cookies are set to expire with session end ( browser close ). Well yeah but they don't. I tried this in chrome and firefox and in both browsers cookies refuse to expire. I wait for all browser processes to close, then re-open and the cookies are still there.

 

 

 

(isset($data['rememberme']) ? $duration = time()+(24*3600*365) : $duration = 0);
Cookies::setCookie('name',$name,$duration);
public static function setCookie($name, $value, $time){
	setcookie($name, $value, $time, "/", "" /*no domain yet*/, FALSE, TRUE);
}

 

^ showing just one, others are identical

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