Welcome Guest, Not a member yet? Register   Sign In
Accessing a session from a model
#1

[eluser]medvind[/eluser]
I'm trying to make a shopping cart in CI. A model called "cart" contains the products in the shopping cart, reads from and writes to the session variable.

Now, it seems the session variable isn't saved properly when I write to it from the model. When writing to it from the controller, though, it works. Is this "normal"? Are you not supposed to access the session from the model? Otherwise something is wrong with my code.

Maybe the problem is that I save an array of objects into the session variable?


Messages In This Thread
Accessing a session from a model - by El Forum - 08-24-2009, 06:42 AM
Accessing a session from a model - by El Forum - 08-24-2009, 07:16 AM
Accessing a session from a model - by El Forum - 08-24-2009, 07:20 AM
Accessing a session from a model - by El Forum - 08-24-2009, 07:26 AM
Accessing a session from a model - by El Forum - 08-24-2009, 07:46 AM
Accessing a session from a model - by El Forum - 08-24-2009, 08:04 AM
Accessing a session from a model - by El Forum - 08-24-2009, 08:40 AM



Theme © iAndrew 2016 - Forum software by © MyBB