Welcome Guest, Not a member yet? Register   Sign In
Retrieving session user_data from the database
#1

[eluser]DocFunky![/eluser]
Hi CI Forumers,

I've been following the user_guide to store my CI session in a database so that my cart is stored when the user log out. When I go to the databse, I see the session of my user saved, with everythiing inside including the cart. Great Smile

But when the user re-connect to the website, it doesn't load that session.
Since I red that CI is supposed to look automatically if, in the user' cookies, the session_id match the DB session_id, it is supposed to load the old session in the database and retrieve the user-data including the cart. But it doesn't .... and build me a new session with a new session ID.

Moreover, I see that the session id are the same in my cookies and in my databse, so it should be a problem coming from the fact that the "retrieve session from the databse if exist" doesn't work or is not activated on my CI installation ...

So Am I supposed to it by myself ? If Yes how ?


Thanks for your help Smile
#2

[eluser]InsiteFX[/eluser]
You need to create a table to store the users cart information!
Then assign it back to the users new session.
#3

[eluser]DocFunky![/eluser]
Thanks, that's what I did, but How do I assign it back to the users new session ?




Theme © iAndrew 2016 - Forum software by © MyBB