[eluser]MisaghCJ[/eluser]
Hi everyone,
I have been searching for my problem since yesterday morning but I couldn't find any solution.
I want to Set two or three or some separate sessions with different names.
for example =>
one sessions : session_1
another session : session_2
another : session_3
......
all of them have different data.
I have found this code :
Code:
$config_session1 = array(
'sess_cookie_name' => 'session1',
'sess_expiration' => 3600
);
$this->load->library('session', $config_session1, 'session1');
// Do something with data of session1
$this->session1->set_userdata('sess1_data', 'salam');
echo $this->session1->userdata('sess1_data').'<br>';
// Create session2
$config_session2 = array(
'sess_cookie_name' => 'session2',
'sess_expiration' => 7200
);
$this->load->library('session', $config_session2, 'session2');
// Do something with session2
$this->session2->set_userdata('sess2_data', 'salam2');
echo $this->session2->userdata('sess2_data');
But it won't work in my project and I have tested any ways but it won't...
Please help me.
Thanks all.