Skip to content

Instantly share code, notes, and snippets.

@Rameshwar-ghodke
Last active April 21, 2017 11:57
Show Gist options
  • Save Rameshwar-ghodke/1464a00344d391d1aaee8e6cab3cb773 to your computer and use it in GitHub Desktop.
Save Rameshwar-ghodke/1464a00344d391d1aaee8e6cab3cb773 to your computer and use it in GitHub Desktop.
$newdata = array(
'username' => 'johndoe',
'email' => '[email protected]',
'logged_in' => TRUE
);
$this->session->set_userdata($newdata);
//In PHP, we can remove data stored in session using the unset() function as
unset($_SESSION[‘some_name’]);
//If you want to remove more values from session or to remove an entire array ,
you can use the below version of unset_userdata() function.
$this->session->unset_userdata($array_items);
// for reference use this links--
https://www.javatpoint.com/codeigniter-login-form
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment