djanim8 Posted May 25, 2006 Share Posted May 25, 2006 I'm not sure how to get the cookie to set only from the time they login in, until they close the browser...this is what I have currently setcookie("Login",$txtLogin,time()+60*60,"","myurl.com",0);that just sets it for an hour, but I want it to ask them for a login EVERY time after they clothes the browser.Is there a way to do that? Link to comment https://forums.phpfreaks.com/topic/10456-just-have-a-cookie-for-the-session-and-thats-it/ Share on other sites More sharing options...
rab Posted May 25, 2006 Share Posted May 25, 2006 $_SESSION['name'] = $loginname;...Sessions close when the browser closes, so I think this is what your looking for. Link to comment https://forums.phpfreaks.com/topic/10456-just-have-a-cookie-for-the-session-and-thats-it/#findComment-39014 Share on other sites More sharing options...
nogray Posted May 25, 2006 Share Posted May 25, 2006 or setcookie("Login", $txtLogin), this will delete the cookie when they close the browser. Link to comment https://forums.phpfreaks.com/topic/10456-just-have-a-cookie-for-the-session-and-thats-it/#findComment-39022 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.