in Codeigniter I am building an Authentication system for my web site and to achieve that I use session library
session->set_userdata(\'username\') <
You can just put this
if ($remember) { $new_expiration = (60*60*24*365); $this->config->set_item('sess_expiration', $new_expiration); $this->config->set_item('sess_expire_on_close', FALSE); $this->session->sess_expiration = $new_expiration; $this->session->sess_expire_on_close = FALSE; }