in my logout function i like to destroy all session except one here is my function :
public function out(){
$ref = $this->session->userdata('ref');
var_dump($ref);
$this->session->sess_destroy();
$this->session->set_userdata('ref', $ref );
$ref = $this->session->userdata('ref');
echo '---------------------------------------<br />';
var_dump($ref);
}
but this doesnt work and it destroys all the session even ref
and when i check ref
in the next page i get null
inn the function page i get this output :
array (size=2)
'val' => int 666
'date' => int 1397060477
---------------------------------------
array (size=2)
'val' => int 666
'date' => int 1397060477
A PHP Error was encountered
Severity: Notice
Message: Undefined index: last_activity
Filename: drivers/Session_cookie.php
Line Number: 590
Backtrace:
A PHP Error was encountered
Severity: Notice
Message: Undefined index: session_id
Filename: drivers/Session_cookie.php
Line Number: 611
Backtrace:
im using 3.0-dev