CodeIgniter Forums
Session best practice - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Session best practice (/showthread.php?tid=38477)



Session best practice - El Forum - 02-09-2011

[eluser]dianikol85[/eluser]
Hi guys! A quick question.

Is the use of session table in database better practice than without using the table?


Session best practice - El Forum - 02-09-2011

[eluser]LuckyFella73[/eluser]
Yes.

That way your cookie only contains the session id and all
session values are only in your database. Don't forget to set
an encryption_key in config.php - Should be 32 characters long.


Session best practice - El Forum - 02-09-2011

[eluser]dianikol85[/eluser]
Thanks LuckyFella73. I will do it that way.