The Session class allows you to keep track of a user's "state" and behaviour while they surf your website. There are a few session storage drivers included with CodeIgniter: database (default; file-system based) files
The data from sessions is accessible throughout the site, but we must first initialise the session before we can use it. We can accomplish that by using function Object() { [native code] } and performing the following code. $this->load->library('session'); You can utilise the session object as seen below after loading the session library.
To keep your session data, php creates an array. $new data = array('username' ='martin,' email' ='someone@martin.com,' user logged => TRUE); $this->session->set userdata($new data); Then call your session data as follows (create a variable and provide it the value of one of the session data you require):
"; Display yet formatting then you can view properly. For print session data you do not need to use print_r() function every time . If you use it then it will be non-readable format.
A session is a server-stored global variable. A unique id is assigned to each session and is used to retrieve saved values. A cookie with the unique session id is kept on the user's computer and returned with every request to the server when a session is created.
Learner's Ratings
4.1
Overall Rating
67%
5%
16%
3%
9%
Reviews
A
Amit Kumar Gaur
5
Please make course on CodeIgniter 4.3 version.
CodeIgniter 3.x.x is too much old for now
#
#Tag
5
good
A
ajay kumar mishra
5
Very nice course
V
Vikash Chandra
5
Very Good Course But Mobile Me Video small dikhai deti hai complete samajh nahi aata.
M
Mr Manoj Kumar Heer
5
Good
B
babita rani
5
This is very useful
N
Nitish Kirtania
5
Good Job , Course very good or very easy to understand ...
Share a personalized message with your friends.