Welcome Guest, Not a member yet? Register   Sign In
keep_flashdata not working in code igniter version 1.6.1
#1

[eluser]Unknown[/eluser]
Hi all,

I am facing problem with code igniter version 1.6.1 while using keep_flashdata with pagination. The same code is working very well in old version i.e. version 1.5.4
I am using the code for search. My controller code is as follows:

Code:
<?
class search extends Controller {
    function __construct(){
        parent::Controller();
        $this->load->database();
        $this->load->model('mmsearch','Mmsearch',true);
    }    

    function srchRapid(){
        if($_POST){
            $this->session->set_flashdata("gender", $this->input->post("gender"));
            $this->session->set_flashdata("education", $this->input->post("education"));
            redirect('/search/rsearch');
        }
        else
            redirect('/login/index');
    }

    function rsearch(){
        $gender = $this->session->flashdata('gender');
        $education = $this->session->flashdata('education');
        if(isset($gender)){
            $this->session->keep_flashdata($gender);
            $this->session->keep_flashdata($education);

            $this->load->plugin('pagination');
            $per_page_value = 3;  
            $per_page_seg = 3;    
            $cur_page_seg = 4;
                
            $per_page = get_per_page($per_page_value, $per_page_seg);
            $offset = get_offset($cur_page_seg, $per_page);

            //generate the query
            $data['profile_listing_list'] = $this->Mmsearch->getProfiles($gender,$education,$offset,$per_page);
            
            //find out the total amount of records
            $total_rows = count($this->Mmsearch->getProfiles($gender,$education,NULL,NULL));

            $data['pbase_url'] = '/search/rsearch';
            $data['pagination'] = init_paginate($cur_page_seg, $total_rows, $per_page, $per_page_seg, $data['pbase_url']);
            
            $this->load->view('searchresult',$data);
        }
        else
            redirect('/search/index');
    }
}

?>

Can anyone please help me out
Thanks in advance




Theme © iAndrew 2016 - Forum software by © MyBB