Session library Issue |
Hi guys,
I am developing a website but no idea why the session is not maintaining.When the user logged in the session is maintained but when I retrieve the data from session in another function it returns null while I check out in the logged in function session is maintaining there. Here is both functions: public function login(){ $this->load->model('admin_model'); $data['email'] = $this->input->post('email_a'); $data['password'] = md5($this->input->post('pw')); $result = $this->admin_model->login($data); //die(var_dump($result)); if($result==true){ echo "true"; $this->load->library('session'); $dataLogin=$this->session->set_userdata('loginData',$result['admin_id']); // die(var_dump( $this->session->userdata('loginData'))); } public function profile(){ $id= $this->session->userdata('loginData'); die(var_dump( $id)); } Can anyone suggest any solution ?
The FAS Solutions
corporate web development web designs and development services http://www.thefas-solutions.com |
Messages In This Thread |
Session library Issue - by isabella - 06-12-2015, 09:55 PM
RE: Session library Issue - by Wouter60 - 06-13-2015, 08:57 AM
RE: Session library Issue - by isabella - 06-13-2015, 11:53 AM
RE: Session library Issue - by Wouter60 - 06-13-2015, 12:06 PM
RE: Session library Issue - by Diederik - 06-14-2015, 03:25 PM
RE: Session library Issue - by skunkbad - 06-14-2015, 03:52 PM
RE: Session library Issue - by isabella - 06-17-2015, 02:56 AM
|