Jump to content

Ci Session Data Through Multiple Functions/views Lost


powpow

Recommended Posts

Hey everyone,

 

I am totally lost on this, I have a controller that is passed a parameter. This parameter is used to retrieve the contact information form the database. On a good return the controller will save the return a session variable. I can prove this by using print_r on the controller as well as when I am in the view.

 

Now here is my problem, I have created a link using CI anchor which calls a different function within the same controller. When I try to call the variable it is no longer populated. I was wondering if I am not acknowledge how to use session variables correctly or if my understanding of how the function interact is a little flaky.

 

here is the function that populates the sess variable

    $memDetail = $this->How_model->lookup($id);

   if(!$memDetail)
    {
        echo "member details are false ";

     // print_r($memDetail);
    }
    else
    {

     // echo "this is memDetai : ";
    // print_r($memDetail);
      $this->session->set_userdata('member_detail', $memDetail);
              print_r($this->session->all_userdata());
     $this->load->view('view_lookup');

 

Let me know if you need any more information. Thank you in advance.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.