[eluser]r@mtbb_[/eluser]
Hi,
I'm sorry to bother you with a very discussed topic but, I still can't make pagination to work on my website. Here's the code:
Code:
//controller
function index()
{
$config['base_url'] = 'http://localhost/website/index.php/see/';
$config['total_rows'] = $this->db->count_all('projects');
$config['per_page'] = 4;
$config['uri_segment'] = 2;
$this->pagination->initialize($config);
$num = $config['per_page'];
$offset = $this->uri->segment(2);
$this->db->orderby("date","desc");
$data['query']= $this->db->get('projects', $num, $offset);
$data['links']=$this->pagination->create_links();
$this->load->view('see_view',$data);
}
Code:
//view_file
<?php foreach($query->result() as $row): ?>
<h3><?php echo $row->title; ?></h3>
<p><?php echo $row->description; ?></p>
<hr />
<?php endforeach; ?>
<?php echo $links; ?>
When i load index.php/see , I get the correct 4 results per page, the correct numbers of links considering the total rows, but when I click a link, there's a 404 message.
The links don't have correct paths. They change along with the $config['per_page']. All the necessary libraryes and helpers are loaded. What could be the problem?
Thanks!