Close this search box.

5 Tutorials On ‘CodeIgniter Sessions’ That Will Help You To Get Most From It

1. Session Class – CI User Guide

The Session class permits you maintain a user’s “state” and track their activity while they browse your site. The Session class stores session information for each user as serialized (and optionally encrypted) data in a cookie. It can also store the session data in a database table for added security, as this permits the session ID in the user’s cookie to be matched against the stored session ID. By default only the cookie is saved. If you choose to use the database option you’ll need to create the session table as indicated below.

2. Creating user session checking with CodeIgniter library

When we build web application with user authentification, the application must have user login/logout or signin/signout or whatever you called it, then the system must have user logged feature to check whether the user is logged in or logged out. Session is the most common way to checking it.

3. Enhanced CodeIgniter Session library

we quietly added some nice enhancements to the CodeIgniter Session library that I wanted to mention.

4. Accessing CodeIgniter Session Data using External Scripts

For a project we’re working on, we have the need to access CodeIgniter session data outside of our CI installation, more specifically for a WordPress installation. CodeIgniter, as most developers should already know, stores it’s session data in a database and uses a cookie to refer to the data, as opposed to storing this data inside of the PHP default $_SESSION superglobal.

5. CodeIgniter Session Checking

what/where is the best way to check for user sessions in CI? I dont want to put session checks in every controller. That is already code smell. Been thinking of a good solution for a while now and this is what I came up with.

The Idea is for all my controllers to inherit from a single parent controller. This way I can put the session check inside the parent controller then all other child classes will inherit this check.

If you know any article that explains even better then please share with us.

share it

One Response

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Latest Posts
The Ultimate Guide to Delta for iPhone: Relive Retro Gaming Glory
The Ultimate World of Warcraft Leveling Guide
Overwatch Boost – What Are You Up To?
Fifteen Baseball Stars Still Looking Up At The Mendoza Line In 2018
NHL Division Standings Analysis 2017-2018
Why Playing Online Games Is Beneficial
Popular Categories
Get free tips and resources right in your inbox, along with 10,000+ others
Subscription Form

Related Article
Sign up our newsletter to get update information, news and free insight.
Subscription Form