I am using Codeigniter 2.1.0 and CI_session for session handling.
I assume that this
- Page A sets some variables in the session using $this->session->set_userdata().
- Page A redirects to Page B
- Page B is expected to retain the session variables that were set in Page A.
However this is what happens to me
- Page A sets some variables in the session using $this->session->set_userdata().
- Page A redirects to Page B
- Page B does not retain the session variables that were set in Page A.
I have code in Page A to save and record the contents of $this->session->userdata in a log before redirection to Page B. The log shows that the values that are set in session exist.
However, using var_dump() on $this->session->userdata on Page B shows that those values don't exists.
I don't really know how this could be. I have double checked that I am not unsetting the values in Page B. It's like CI_Session is somehow unsetting them behind the scenes.
Any ideas?
EDIT: Yes, I am using the database to save session data. The field type is TEXT.
$config['sess_use_database'] = TRUE;.. and check... - bipen