Welcome Guest, Not a member yet? Register   Sign In
Pagination with $_GET => double page variables
#1

[eluser]teomor[/eluser]
I'm using the $_GET version of the pagination. This is my config:
Code:
$config['page_query_string'] = TRUE;
$config['query_string_segment'] = 'offset';
and this is my controller:
Code:
$this->pagination->base_url = site_url()."admin/users/?".http_build_query($_GET);
$this->pagination->total_rows = $total_rows; // total rows from the db
$this->data['pages'] = $this->pagination->create_links(); // this is the html output
Now, when I change to another page, the previous value of offset is stuck in the URL, but the new offset variable appears also, like this: admin/users/?offset=&offset=5. I looked at the Pagination class and there's actually no attempt to remove the existing variable so... you tell me, is this a bug?


Messages In This Thread
Pagination with $_GET => double page variables - by El Forum - 12-15-2011, 02:52 PM
Pagination with $_GET => double page variables - by El Forum - 02-28-2012, 04:42 PM



Theme © iAndrew 2016 - Forum software by © MyBB