powpow Posted October 27, 2012 Share Posted October 27, 2012 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. Link to comment https://forums.phpfreaks.com/topic/269961-ci-session-data-through-multiple-functionsviews-lost/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.