if click second link the url pass value but then i click next the url value will empty. any one healp me ...!
this is my controllere
public function search()
{
$this->load->library('pagination');
$prdictive= $this->input->post('printable_name');
$category=$this->input->post('category');
$area=$this->input->post('area');
$this->load->library("pagination");
$config = array();
$config["base_url"] = base_url() . "Main_control/search/".$area.'/'.$category;
$area2 = $this->uri->segment(3);
$category2 = $this->uri->segment(4);
$page = $this->uri->segment(5);
$config['total_rows'] = $this->Main_model->record_count($category,$category2,$area,$area2);
$config["per_page"] = 3;
$config["uri_segment"] = 5;
// $choice = $config["total_rows"] / $config["per_page"];
// $config["num_links"] = round($choice);
$config['page_query_string'] = false;
$config['reuse_query_string'] = true;
$config['full_tag_open'] = '<ul class="pagination">';
$config['full_tag_close'] = '</ul>';
$config['first_link'] = false;
$config['last_link'] = false;
$config['first_tag_open'] = '<li>';
$config['first_tag_close'] = '</li>';
$config['prev_link'] = '«';
$config['prev_tag_open'] = '<li class="prev">';
$config['prev_tag_close'] = '</li>';
$config['next_link'] = '»';
$config['next_tag_open'] = '<li>';
$config['next_tag_close'] = '</li>';
$config['last_tag_open'] = '<li>';
$config['last_tag_close'] = '</li>';
$config['cur_tag_open'] = '<li class="active"><a href="#">';
$config['cur_tag_close'] = '</a></li>';
$config['num_tag_open'] = '<li>';
$config['num_tag_close'] = '</li>';
$this->pagination->initialize($config);
$data["links"] = $this->pagination->create_links();
$config['first_url'] = base_url() . "Main_control/search/".$area.'/'.$category;;
// $this->session->set_userdata('category', $categorya);
// $category=$this->session->userdata('category');
// $this->session->set_userdata('area',$area1);
// $area=$this->session->userdata('area');
$data['main']=$this->Main_model->main_category();
$data['searchbanner']=$this->Main_model->searchbanner($area,$category);
// echo '<br>area='.$area;
// echo '<br>area2='.$area2;
// echo '<br>cat2='.$category2;
// echo '<br>cat='.$category;
// exit();
if(!$data["results"] = $this->Main_model->fetch_data($area,$area2,$category,$category2,$config["per_page"], $page))
{
echo 'result not found';
echo $category;
echo $area;
}
else{
$this->load->view("listing-two",$data);
}
}