Jump to content

Archived

This topic is now archived and is closed to further replies.

djanim8

Just have a cookie for the session and thats it

Recommended Posts

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?

Share this post


Link to post
Share on other sites
$_SESSION['name'] = $loginname;
...

Sessions close when the browser closes, so I think this is what your looking for.

Share this post


Link to post
Share on other sites
or setcookie("Login", $txtLogin), this will delete the cookie when they close the browser.

Share this post


Link to post
Share on other sites

×

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.