title: Pagination with search in codeigniter
body: <p>I am making log table which consist of all the logs in the project, Using the pagination of CI i have created pagination data. Now the problem is i have to filter the logs according to the different log type and pagination also, I have tried a lot but still not able to figure it out how to generate paginated links for search. I am pasting the controller code 
  Thank You.</p>
  
  <pre><code>{
  
      if($this-&gt;input-&gt;post('show'))
          $logtype_filter = $this-&gt;input-&gt;post('log_type');
      else
          $logtype_filter ='';
  
      // load pagination class
      $this-&gt;load-&gt;library('pagination');
      $config['base_url'] = base_url().'admin/logs/';
      $config['total_rows'] = $this-&gt;db-&gt;count_all('netsynclogtable');
      $config['per_page'] = '20';
      $config['first_link'] = FALSE;
      $config['last_link'] = FALSE;
      $config['prev_link'] = 'Previous';
      $config['next_link'] = 'Next';
      $config['next_tag_open'] = '&lt;li class="next"&gt;';
      $config['next_tag_close'] = '&lt;/li&gt;';
      $config['prev_tag_open'] = '&lt;li class="previous"&gt;';
      $config['prev_tag_close'] = '&lt;/li&gt;';
      $config['num_tag_open'] = '&lt;li&gt;';
      $config['num_tag_close'] = '&lt;/li&gt;';
      $config['cur_tag_open'] = '&lt;li class="active"&gt;';
      $config['cur_tag_close'] = '&lt;/li&gt;';
  
      $this-&gt;pagination-&gt;initialize($config);
  
      //load the model and get results
      $this-&gt;load-&gt;model('Logger_model');
      $data['logs'] = $this-&gt;Logger_model-&gt;get_logs($config['per_page'],$this-&gt;uri-&gt;segment(3),$logtype_filter);
      $data['logtypes'] = $this-&gt;Logger_model-&gt;get_log_types();
      $data['_view'] = 'admin/logs';
      // load the view
  
      $this-&gt;load-&gt;view('layouts/admin',$data);
  }
  </code></pre>