Storing Session Data in Database By Codeigniter
Codeigniter storing session data in database. In Codeigniter by default session store in the files that is not good in the security point of view. we can not store bulk data in session. If we want to store more data we need to find the alternative solution for that, so the alternative solution is that store session in the database. Codeigniter have natively avaliable this, we can easily store the session in database we just need to do some config changes.
First Create a database table
After creating the database table now you just need to open config.php file and in this file you need to enable database for session and also specify the table name.following are the setting for config.php file.
Now you go to the autoload.php, and add “session” to the drivers element:
0 comments:
Post a Comment
Thanks