Reputation: 75
I create a website using codeigniter with registration and login page with session the both are working fine but i need to save the datas in particular user using session and i need to get the values for the particular user in codeigniter. I am newer in codeigniter i dont know how to use the session value to get the particular user value and save the datas in particulate user.
I checked in google no tutorial is help for me can any one help me thanks in advance.
Upvotes: 0
Views: 878
Reputation: 6994
First you have to load session
library.Using
$this->load->library('session');
OR in application/config/autoload.php
using
$autoload['libraries'] = array('session');
Then you can set
session item using
$this->session->set_userdata('name');
And get
session item using
$this->session->userdata('name');
For more see docs Codeigniter Session Library
Upvotes: 2