Session data handling

I'm trying to understand the session class.

I have multiple controllers that will write to and read from the session cookie. Let's say we've got Controller A and Controller B.

Now, when Controller A does this:
$userdata['test'] = "hello";

And Controller B does this:
echo $this->session->userdata('test');

I expect to get a "hello". Instead there is nothing. The user data is gone. I must have misunderstood something here, but what?

Never mind this. It was all because of my customized routing. I thought I was looking at Controller B when it was another one altogether...

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.