I would like to store the variable in the session currently i am tryin like this but not working.
In Controller
set in session
$newdata = array( 'username' => 'johndoe', 'email' => 'johndoe@some-site.com', 'logged_in' => TRUE ); $this->session->set_userdata($newdata);
retrieve from session
$this->session->userdata('username');