If a user logs in and selects "Remember me for 2 weeks", I want the session to remember them for 2 weeks. If not, it should expire in 2 hours. How do I do this?
views:
29answers:
1
+2
A:
//if variable two_weeks is set, set session expiration to 2 weeks; otherwise 2 hours
($two_weeks)?$t='1209600':$t='7200');
$this->session->set_userdata('sess_expiration',$t);
stormdrain
2010-06-21 19:14:22