Welcome Guest, Not a member yet? Register   Sign In
Weird Session Problem
#1

[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


Messages In This Thread
Weird Session Problem - by El Forum - 03-08-2008, 10:01 PM
Weird Session Problem - by El Forum - 03-09-2008, 05:43 AM
Weird Session Problem - by El Forum - 03-09-2008, 09:28 AM



Theme © iAndrew 2016 - Forum software by © MyBB