Part 20 CodeIgniter 4 Tutorial Series in Urdu/Hindi: C.R.U.D Operations using Session Library Class

388 views

Published by Learning Shala

Web Development

Published on 30 August, 2020
Category :

Codeigniter, Web Development

About :

Hello Friends,
Welcome back to the Part 20 CodeIgniter 4 Tutorial Series in Urdu/Hindi: C.R.U.D Operations using Session Library Class.

The Session class permits you to maintain a user’s “state” and track their activity while they browse your site.

Sessions will typically run globally with each page load, so the Session class should be magically initialized.

When a page is loaded, the session class will check to see if a valid session cookie is sent by the user’s browser. If a session cookie does not exist (or if it doesn’t match one stored on the server or has expired) a new session will be created and saved.

If a valid session does exist, its information will be updated. With each update, the session ID may be regenerated if configured to do so.

It’s important for you to understand that once initialized, the Session class runs automatically. There is nothing you need to do to cause the above behavior to happen. You can, as you’ll see below, work with session data, but the process of reading, writing, and updating a session is automatic.

CodeIgniter comes with a few session storage drivers, that you can see in the last section of the table of contents:

Playlist Videos
Related Videos