Codeigniter Session

Codeigniter Session

#1 Step Set Library in Controller :


Add above code in your controller method that enable to user session in your controller model and view file.

#2 Step Save value in session :


 Set value in session using set_userdata() function, here you need to two thing required #2.1 name of session (as per your use) #2.2 Value of session (what data you want to store).

#3 Step GET value From session :


Get value from session using userdata() function, here you need only session name.