Welcome Guest, Not a member yet? Register   Sign In
CI' session question
#3

[eluser]chmod[/eluser]
[quote author="iainco" date="1227999289"]Have you loaded the session library in the other controller?

You should probably have the session library autoload. You can change that in your autoload.php

Also, you have a syntax error with this code

Code:
$this->session->set_userdata('islogin' => TRUE)

It should be:

Code:
$this->session->set_userdata(array('islogin' => TRUE))

or

Code:
$this->session->set_userdata('islogin', TRUE)
[/quote]



I am sure loaded the session lib in autoload.php:
Code:
$autoload['libraries'] = array('database','session','form_validation');


and I set session like this:
Code:
$custom_session_data = array('username' => $this->input->post('username'),
                                            'isloginto' => true,
                                            'session_id_user' => $this->session->userdata('session_id'));
                $this->session->set_userdata($custom_session_data);


Messages In This Thread
CI' session question - by El Forum - 11-29-2008, 09:45 AM
CI' session question - by El Forum - 11-29-2008, 10:54 AM
CI' session question - by El Forum - 11-29-2008, 11:31 AM
CI' session question - by El Forum - 11-29-2008, 11:47 AM
CI' session question - by El Forum - 11-29-2008, 11:02 PM
CI' session question - by El Forum - 12-01-2008, 06:53 AM
CI' session question - by El Forum - 12-01-2008, 10:27 AM



Theme © iAndrew 2016 - Forum software by © MyBB