Welcome Guest, Not a member yet? Register   Sign In
Session problem - probably a basic one.
#1

[eluser]netameta1[/eluser]
Well its kind of really basic problem with sessions.
I have been looking for an answer in the guide and in google and cant find the answer maybe its so basic.

I am used to php normal session - where you $_session['bla']=something .. and next time you want to retrieve it you'll just use that same thing.
now with CI this is how i insert the data.

Code:
$newdata = array(
                   'username'  => 'johndoe',
                   'email'     => '[email protected]',
                   'logged_in' => TRUE
               );

$this->session->set_userdata($newdata);

Or
$this->session->set_userdata('jayson', '15');

My question is - to fetch them do i use it like that:
Code:
$session_id = $this->session->userdata('newdata');
$session_id = $this->session->userdata('jayson');

also if that is correct, and the array newdata goes to $session_id will i treat $session_id like it where newdata ?

Thanks in advanced.




Theme © iAndrew 2016 - Forum software by © MyBB