How to create custom session using codeigniter |
[eluser]senz[/eluser]
Hi all, I want to make a session with codeigniter. But i want to add the field such as session_host and session_page from the existing session table, which aims to know the hostname of the visitor and any pages that have been visited by visitors. My question is, how to create custom session using codeigniter? Do I need to change the session files in a library? Or is there any configuration should I add? FYI : i have made table ci_sessions ----------------- Field Name ----------------- sessions_id ip_address user_host => hostname from the visitors session_page => the page has been clicked by visitors user_agent last_activity ----------------- Please help me!! Regards, Senz
[eluser]Thorpe Obazee[/eluser]
Code: $this->session->set_userdata('session_host', 'value'); You don't need to change anything in the config or the Session Library.
[eluser]Bart v B[/eluser]
[quote author="senz" date="1272550846"]Where that codes should I put?[/quote] In youre Controller or model, where you need to change the session
[eluser]billmce[/eluser]
Check out the user guide: http://ellislab.com/codeigniter/user-gui...sions.html |
Welcome Guest, Not a member yet? Register Sign In |