Jump to content

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.