jjacquay712 Posted September 24, 2008 Share Posted September 24, 2008 i have created a login script, but im using php session(), so everytime i close by browser, the cookies are deleted. is there a way to change so the cookies stay on the computer even when the browser is closed? I want users to choose when they log out. Link to comment https://forums.phpfreaks.com/topic/125687-solved-php-sessions/ Share on other sites More sharing options...
awpti Posted September 24, 2008 Share Posted September 24, 2008 Yeah, use cookies with sessions. sessions themselves don't create magical cookies that hang around forever. Look at setcookie() Link to comment https://forums.phpfreaks.com/topic/125687-solved-php-sessions/#findComment-649922 Share on other sites More sharing options...
jjacquay712 Posted September 24, 2008 Author Share Posted September 24, 2008 I found it! you use session_set_cookie_params(3140); where 3140 is the time in seconds before the cookie expires. then you start the session. session_set_cookie_params(3140); session_start(); Link to comment https://forums.phpfreaks.com/topic/125687-solved-php-sessions/#findComment-649931 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.