title: Codeigniter Pagination issue with query string
body: <p>I have a pagination script that i made in codeigniter, and here's my script</p>
  
  <pre><code>/*---product_pagination----*/
          $total_row = $this-&gt;autoload_model-&gt;get_data_from_table("td_model,td_country","*",
                                                                  "td_country.country_id = td_model.model_country
                                                                   AND td_model.model_id &gt; 0
                                                                   ORDER BY td_model.model_username")-&gt;num_rows();
  
          echo $total_row;
          $this-&gt;load-&gt;library('pagination');
          //$start_row= $this-&gt;uri-&gt;segment(3);
          $segment_3 = $this-&gt;uri-&gt;segment(3);
          if($segment_3 == '')
          {
              $start_row = 0;
          }
          else
              $start_row = $_REQUEST['start_row'];
          if(isset($_REQUEST['per_page']))
              $perpage = $_REQUEST['per_page'];
          else
              $perpage = 2;
          if(trim($start_row) == '')
          {
           $start_row =0;
          }
          $config['base_url'] = base_url().'model/show_model/?start_row='.$start_row;
          $config['total_rows'] = $total_row;
          $config['per_page'] = $perpage;
          $config['uri_segment'] = 3;
          $config['page_query_string'] = TRUE;
          $config['full_tag_open'] = "&lt;div class='pagination'&gt;";
          $config['full_tag_close'] = '&lt;/div&gt;';
          $config['cur_tag_open'] = "&lt;span style='width: 80px; '&gt;";
          $config['cur_tag_close'] = '&lt;/span&gt;';
          $config['first_link'] = '&lt;&lt; First';
          $config['first_tag_open'] = "&lt;span style='width: 80px; '&gt;";
          $config['first_tag_close'] = '&lt;/span&gt;';
          $config['last_link'] = 'Last &gt;&gt;';
          $config['last_tag_open'] = "&lt;span style='width: 80px; '&gt;";
          $config['last_tag_close'] = "&lt;/span&gt;";
          $config['next_link'] = 'Next &gt;';
          $config['next_tag_open'] = "&lt;span style='width: 80px; '&gt;";
          $config['next_tag_close'] = '&lt;/span&gt;';
          $config['prev_link'] = '&lt; Prev';
          $config['prev_tag_open'] = "&lt;span style='width: 80px; '&gt;";
          $config['prev_tag_close'] = '&lt;/span&gt;';
          $this-&gt;pagination-&gt;initialize($config);
          $data['pagination'] = $this-&gt;pagination-&gt;create_links();
          $data['all_model']=$this-&gt;autoload_model-&gt;get_data_from_table("td_model,td_country","*",
                                                                  "td_country.country_id = td_model.model_country
                                                                   AND td_model.model_id &gt; 0
                                                                   ORDER BY td_model.model_username")-&gt;result_array();
          $data['model_list']=$this-&gt;autoload_model-&gt;get_data_from_table("td_model,td_country","*",
                                                                  "td_country.country_id = td_model.model_country
                                                                   AND td_model.model_id &gt; 0
                                                                   ORDER BY td_model.model_username
                                                                   LIMIT $start_row, $perpage")-&gt;result_array();
  
          /*$this-&gt;product_model-&gt;products_fragment_by_category($cat_slug,$start_row,$perpage);*/
  
          /*----pagination ends------*/
  
         $this-&gt;load-&gt;view('header',$data);
         $this-&gt;load-&gt;view('header_lower');
         $this-&gt;load-&gt;view('model_list');
         $this-&gt;load-&gt;view('left_bar');
         $this-&gt;load-&gt;view('footer');
      }
  </code></pre>
  
  <p>the issue is that i am getting this url</p>
  
  <pre><code>http://localhost/ecam/model/show_model/?start_row=0&amp;per_page=2
  
  http://localhost/ecam/model/show_model/?start_row=0&amp;per_page=4
  </code></pre>
  
  <p>why is that per_page getting extended to 2 4 6...</p>
  
  <p>it seems that start_row value is getting as the per_page value;</p>