[eluser]Slowcheetah[/eluser]
Thanks Wabu, works like a charm now.
The only problem now is that i have to remember to unset all the sessions manually when i sign-out. Is it possible to loop trough all session items and unset them??
CURRENT CODE
Code:
function signout() {
// destroy all sessions
$account_data = array(
'account_id'=>'', 'username'=>'', 'password'=>'', 'email'=>''
);
$this->session->set_userdata($account_data);
// set user message
$this->session->set_flashdata('msg', 'Succesfully signed out.');
// Redirect to signin page
redirect('');
}