[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)
{
echo $param2; // Prints out 'h'
$this->session->set_userdata('myparam', $param2);
echo $this->session->userdata('myparam'); // Prints out 'h'
}
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