CodeIgniter Forums

Full Version: Codeigniter sessions
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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. Big Grin Big Grin Big Grin Big Grin
http://www.codeigniter.com/user_guide/li...sions.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');
Thank you sampoyigi Smile
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!! :'(
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.