A user is automatically logged out of my site upon closing the browser.
Is there a way to make cookies stay active after the browser is closed开发者_JS百科?
<?php
setcookie("test", "test", time()+3600);
?>
Just set the time on it to expire in the future.
You need to manualy set the cookies to keep the session. You need a manualy computed session to identify the user when he opens the browser again.
精彩评论