Codeigniter sessions - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: Codeigniter sessions (/showthread.php?tid=63296) |
Codeigniter sessions - WaelBY - 10-16-2015 Hello my friends, I am now working on my first project in Codeigniter and i need help. I want to use the "Session" library but i didn't find how to start!! Can anybody help me and send me links to some exemples or tutorials?? Thank you all. RE: Codeigniter sessions - sampoyigi - 10-19-2015 http://www.codeigniter.com/user_guide/libraries/sessions.html That will definitely show you how to use the Session Library Add session data with $this->session->set_userdata('some_name', 'some_value'); and retrieve it with $this->session->userdata('item'); RE: Codeigniter sessions - WaelBY - 10-19-2015 Thank you sampoyigi RE: Codeigniter sessions - WaelBY - 10-20-2015 Hello, Well i successfully use session in my project but the session data disappears in the first refresh!!! I searched all the net and i found that it's a common problem but i didn't find a good solution!! Can anybody help me please!! :'( RE: Codeigniter sessions - sampoyigi - 10-23-2015 I can only think of two reasons why the sesssion data will disappear after first refresh, either you are using the tempdata/flashdata or your session preferences is not correctly set in your configuration file. |