Codeigniter session issue. It logs me out from admin when I visit the un-admin part of the site! - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Codeigniter session issue. It logs me out from admin when I visit the un-admin part of the site! (/showthread.php?tid=59165) |
Codeigniter session issue. It logs me out from admin when I visit the un-admin part of the site! - El Forum - 08-31-2013 [eluser]behnampmdg3[/eluser] The admin is located in www.site.com/admin The site is located in www.site.com/site In admin I have a form and create a session to log in: Login create session: Code: if($this->input->post('password')=='wws') Code: if ($this->session->userdata('logged_in')!=TRUE) Why????? Codeigniter session issue. It logs me out from admin when I visit the un-admin part of the site! - El Forum - 08-31-2013 [eluser]gummiforweb[/eluser] When thing like this happen, what I'd do is, echo out the sessions to see what's the actual value is. For example: Code: var_dump($this->session->all_userdata()); try using the !== operator too. if all_userdata() is an empty array, then there's some setting problem. |