Welcome Guest, Not a member yet? Register   Sign In
Question about Sessions ...
#6

(11-11-2014, 07:28 PM)kilishan Wrote: While the sessions shouldn't be regenerated each time, I have run into situations where a cookie-based session within CI wasn't working. . . . In every instance that I recall, changing sessions to be stored in the database resolved that issue.

Wow, I didn't know that. But in case storing sessions in the database is more complicated than someone wants to do things, here's how to set up a custom class that uses the regular PHP sessions.

http://www.moreofless.co.uk/using-native...deigniter/

And of course, you don't even have to use a library. You can use regular PHP session code as usual. Just put the session_start() in your constructor, and then add data to the $_SESSION variable in the usual way ($_SESSION ['customer'] = 'Joe Smith')
Reply


Messages In This Thread
Question about Sessions ... - by ozzy mandiaz - 11-11-2014, 03:09 PM
RE: Question about Sessions ... - by benedmunds - 11-11-2014, 05:57 PM
RE: Question about Sessions ... - by ella - 11-11-2014, 07:05 PM
RE: Question about Sessions ... - by RobertSF - 11-12-2014, 07:38 PM
RE: Question about Sessions ... - by RobertSF - 11-11-2014, 06:26 PM
RE: Question about Sessions ... - by kilishan - 11-11-2014, 07:28 PM
RE: Question about Sessions ... - by RobertSF - 11-11-2014, 07:47 PM
RE: Question about Sessions ... - by ozzy mandiaz - 11-12-2014, 06:47 PM
RE: Question about Sessions ... - by ozzy mandiaz - 11-12-2014, 09:22 PM
RE: Question about Sessions ... - by InsiteFX - 11-12-2014, 09:39 PM
RE: Question about Sessions ... - by ozzy mandiaz - 11-12-2014, 10:04 PM



Theme © iAndrew 2016 - Forum software by © MyBB