How to update certain session |
Hi, I have problem with codeigniter session. I want update certain session. Example I store my email, username, and user_lvl in session. If I change/update email in user profile and I click submit button. The new email will update in session.
This is how I store my session in codeigniter: PHP Code: $setSession= array(
This is me. JK not me.
@falcon812311,
Here is the CI documentation on session variables: https://codeigniter.com/user_guide/libra...sion-class It shows how to update a session variable. All that is necessary is placing it at the right location in your code to update.
Very easy.
PHP Code: $_SESSION['email'] = "[email protected]"; This will also work. PHP Code: $this->session->email = "[email protected]"; The first is slightly more efficient and is what the documentation recommends. (See second paragraph of the linked documentation section.) |
Welcome Guest, Not a member yet? Register Sign In |