Welcome Guest, Not a member yet? Register   Sign In
Database Data to Session
#1

[eluser]ibnclaudius[/eluser]
I use this line of code to get the user info:
Code:
$this->db->get_where($table, $data);

after that, I want to automatically set all the sessions based on the result, like this:
Code:
$this->session->set_userdata('fieldname', 'fielddata');

I can do each one manually, but I'd like to make it automatically, but isnt coming any idea in my head, probably using foreach...




Theme © iAndrew 2016 - Forum software by © MyBB