Welcome Guest, Not a member yet? Register   Sign In
pagination current page not changing
#1

Hi Coders,

i just wanna know on how to set-up pagination while enable_query_strings is enable or set to true. i tried in many ways but im failed.  and i just get the link work but the data cannot retrieved for the next page.

here my current code.
PHP Code:
$config["base_url"] = base_url() . "index.php?dir-move=public&switch=branch_reports&task=branch_report_por";
$config["total_rows"] = $this->model_ho_por->page_count_for_br_por_sr_report();
$config["per_page"] = 3;
$config["uri_segment"] = 3;
$config['num_links'] = 2;
$config['page_query_string'] = true;
$config['full_tag_open'] = '<ul class="pagination">';
$config['full_tag_close'] = '</ul>';
config['prev_link'] = '&lt;';
$config['prev_tag_open'] = '<li>';
$config['prev_tag_close'] = '';
$config['first_link'] = 'First';
$config['first_tag_open'] = '<li>';
$config['first_tag_close'] = '';
$config['next_link'] = '&gt;';
$config['next_tag_open'] = '<li>';
$config['next_tag_close'] = '';
$config['cur_tag_open'] = '<li class="active"><a href="">';
$config['cur_tag_close'] = '</a></li>';
$config['num_tag_open'] = '<li>';
$config['num_tag_close'] = '';
$config['last_link'] = 'Last';
$config['last_tag_open'] = '<li>';
$config['last_tag_close'] = '';
$this->pagination->initialize($config);
$page = ($this->uri->segment(3))? $this->uri->segment(3) : 0;
$data["load_rs_report"] = $this->model_ho_por->branch_ho_sr($config["per_page"], $page);
$data["pages"] = $this->pagination->create_links(); 
Reply


Messages In This Thread
pagination current page not changing - by jaysondotp - 09-21-2016, 10:14 PM



Theme © iAndrew 2016 - Forum software by © MyBB