Storing and Retrieving Session Data |
[eluser]maddtechwf[/eluser]
I've looking through the manual trying to figure out how to store data in the Session and then retrieve it and show it when I need to. I have the session library initiated in the autoload file. I just can't figure out how to write data to it.
[eluser]maddtechwf[/eluser]
Okay, so I figured out my initial issue. I wasn't using set_userdata. I have an array that is returned when a username and email address is verified in my database, how can I access specific data out of the array? Lets say that I have an array called $res and it have 6 values in the array. I'm trying to pull a specific item out of the array and storing it in my session data using set_userdata.
[eluser]boltsabre[/eluser]
Quote:how can I access specific data out of the array?By its array key Quote:I’m trying to pull a specific item out of the array and storing it in my session data using set_userdata.$this->session->set_userdata('email', $res['email']); Check out the official CI documentation if you haven't already: http://ellislab.com/codeigniter/user-gui...sions.html |
Welcome Guest, Not a member yet? Register Sign In |