simple problem with session (login) - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: simple problem with session (login) (/showthread.php?tid=65619) |
simple problem with session (login) - Sarog - 07-02-2016 Good day. I broke my brain with this problem. This is code in controller Login PHP Code: private $logged_in; But this code main controller PHP Code: private $logged_in; And in function index() $this->logged_in is FALSE Why? Thanks for help RE: simple problem with session (login) - arma7x - 07-02-2016 What is $this->session->userdata('logged_in') value? Have your dump $_SESSION? You can set session userdata by using $this->session->set_userdata('some_name', 'some_value'). The userdata() method returns NULL if the item you are trying to access does not exist. |