here are the parts that i think are relevant:
EDIT: when i use regular $_SESSION
- evrything works...
function A saves the session data, than calls a view, that returns the data the user added to it to function B. both func开发者_StackOverflowtion A and function B are on the same controller. im using 2.0.2 version.. so when it also asked me to enter encryption key in the config file.
the problem is, that the session don't save the data when i move between the pages.. i also noticed that it changes the session_id varible...
do you know what am i doing wrong?
another important information - i return a value threw the URL to function B.
controller welcome: functionA
...
$data = array(
'username' => $myusername,
'is_logged_in' => true,
'permissions' =>$permissions
);
$this->session->set_userdata($data);
...
...
$this->load->view('login_success',$dataV);
controller welcome: functionB
$user=$this->session->userdata('username');
echo "<br> IN LINK REFERENCE: $user";
do you know what am i doing wrong?
Not sure, but looks like you haven't initialized your Session
library. Can you please check if you have initialized Session
library correctly? Please check $autoload['libraries'] = array();
in config/autoload
directory.
精彩评论