Welcome Guest, Not a member yet? Register   Sign In
session store in database
#1

[eluser]echo sara[/eluser]
Hi all,

I am currently stuck on storing session data in my database. I have created a session which seem to work as of now but i am confused on how to take session info (ip, last active(timestamp)..etc and store it my database. I'm not sure how to extract the information from the session to insert it into my database. Any assistance is welcome. Thanks!!


Code:
$whats_on_sess = $this-> session->set_userdata(array (
                'logged_in' => TRUE,
                'user_id' => $username,
                'last_active' => time())
                );

This is just a sample i do plan on adding more info to my sessions




Theme © iAndrew 2016 - Forum software by © MyBB