Manixat Posted March 31, 2013 Share Posted March 31, 2013 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.