Welcome Guest, Not a member yet? Register   Sign In
Strange value in session cookie
#1

[eluser]Unknown[/eluser]
Hi!
I am doing something like this in my controller:
Code:
function set_family()
    {
        $family_id=$this->uri->segment(3);
        $this->session->unset_userdata('person_family_id');
        $this->session->set_userdata(array('person_family_id'=>$family_id));
        $this->load->view('gallery_view',$this->_set_view_data(0));
    }
The $family_id is then a number 1 or 2 in my session.
After this, in my view, wen I click on link, I am doing this action:
Code:
function upload()
    {
        $family_id = $this->session->userdata('person_family_id');
    }
But, in function upload(), value of $family_id is not a number, but string 'js'.
Between set_family_action and upload action I dont modify anything in session data. So why I dont have number 1 or 2, but instead of this, string 'js'?
I have to add, that first, in other controller, I initialize the value of family_id in session. Could it be, that when the value in cookie is set in one controller, it cant be set to other value in other controller? I think, that when I initialize session in first controller, i can't modify values of cookie in other controller. Am I correct?


Messages In This Thread
Strange value in session cookie - by El Forum - 07-17-2008, 03:12 AM



Theme © iAndrew 2016 - Forum software by © MyBB