I am trying to make a pagination and I almost get it, but when I change one page to another (click page 1, later click page 2) does not work, but when I do manually it works. That is becouse when I click in the links in my browser show this:&page=40, and manually I only put the 40. I do not know why is that.
this is my Controller
function Test ($value){ if($value =='1') { $config['per_page'] = 20; $config['num_links'] = 10; $config["total_rows"] = $this->db->get('normas')->num_rows(); $data['query'] = $this->db->get('normas', $config['per_page'], $this->uri->segment(4)); $this->pagination->initialize($config); $data["links"] = $this->pagination->create_links(); (...) } }
My view
<?php foreach ($query->result() as $row) { echo '<p>'. $row->norma.'</p>'; } echo $links; ?>
Please help!!, thanks in advance.