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

Link to comment
https://forums.phpfreaks.com/topic/276361-cookies-dont-expire/
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.