Welcome Guest, Not a member yet? Register   Sign In
Why can't I do this in CI?
#6

[eluser]Aken[/eluser]
I did notice that the redirect is commented out, but you also have comments describing the problem right above it, so I'm addressing that.

My guess is the set_session() method is working just fine. Try making the property public, and then var_dump it in your controller after setting it.

The problem is, all your set_session() method is doing is assigning a value to a property. Once you make another page request, via refresh or redirect, that property is gone, because your class has been newly instantiated. Upon that new instantiation, the __construct() function is then using the _session_id property, which is NULL, because nothing has changed it yet in that request.


Messages In This Thread
Why can't I do this in CI? - by El Forum - 07-11-2012, 02:25 PM
Why can't I do this in CI? - by El Forum - 07-11-2012, 10:16 PM
Why can't I do this in CI? - by El Forum - 07-11-2012, 11:37 PM
Why can't I do this in CI? - by El Forum - 07-11-2012, 11:42 PM
Why can't I do this in CI? - by El Forum - 07-11-2012, 11:55 PM
Why can't I do this in CI? - by El Forum - 07-11-2012, 11:57 PM
Why can't I do this in CI? - by El Forum - 07-12-2012, 12:44 AM
Why can't I do this in CI? - by El Forum - 07-12-2012, 05:44 PM
Why can't I do this in CI? - by El Forum - 07-12-2012, 06:41 PM
Why can't I do this in CI? - by El Forum - 07-12-2012, 07:13 PM
Why can't I do this in CI? - by El Forum - 07-12-2012, 07:33 PM
Why can't I do this in CI? - by El Forum - 07-12-2012, 08:41 PM
Why can't I do this in CI? - by El Forum - 07-12-2012, 08:44 PM
Why can't I do this in CI? - by El Forum - 07-12-2012, 09:32 PM



Theme © iAndrew 2016 - Forum software by © MyBB