Weird Session Problem |
[eluser]mdavis1982[/eluser]
Hi all... I'm having some really weird session problems that I just can't figure out! In my code I do: Code: function myFunction($param1 = NULL, $param2 = NULL) This seems to work fine, but when I come to echoing the session variable out later on in my site, I find that it's suddenly changed itself to 'public', instead of the value of $param2. If I change the set_userdata line above to $param1, it works flawlessly. Has anyone got some ideas? Cheers... Matt
[eluser]mdavis1982[/eluser]
Hi Guys... Has anyone got any ideas about this? It seems to only happen with the $param2 variable... If I go to http://localhost/controller/myfunction/param1/h, then the site echoes out the correct things... If later on I have: Code: function myFunction2() Then it prints out 'public', instead of 'h'. I've checked everywhere and the session variable has not been set again... I've also tried using the CI session library and RA_Session from the Wiki, but both do the same thing. Does anyone have any ideas? Cheers... Matt
[eluser]dmiden[/eluser]
Well, try a clean-install and just do the myparam thingy. If it still returns 'public' it's prolly hardcoded into CI. Otherwise it _do_ seem like you're/ your script is setting it elsewhere. Double check, and if you're unsuccessful, just use another name for the session item. |
Welcome Guest, Not a member yet? Register Sign In |