Reputation: 7560
When I try to insert some value into session from a controller function, it doesn't store the value.
I don't have the problem in storing session when checking login. But in another controller (I try to save into session to enable searching) and try printing the value in another controller, the ones that are recently inserted goes blank.
Its weird because I have followed all the rules of assigning values to session in Code Igniter.
The controller code is
$this->session->set_userdata("langId",$lang[0]->languageId);
$this->session->set_userdata("direction",$lang[0]->direction);
Upvotes: 0
Views: 835
Reputation: 942
Try this should work
$this->session->set_userdata("langId",$lang->languageId);
$this->session->set_userdata("direction",$lang->direction);
Upvotes: 1