• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
pagination bug,unable to click on first page,everything else works fine

#1
[eluser]Unknown[/eluser]
Code:
class Basicpagination extends CI_Controller
{
    
   function loadpage($offset=0)
   {    
    $total=$this->db->query("select * from franta");

    $query=$this->db->query("select * from franta limit $offset,5");
    //echo $this->table->generate($query);
    
    
  
     $config['base_url'] = 'http://localhost/production//tuts/basicpagination/loadpage/';
     $config['total_rows'] =$total->num_rows() ;
     $config['per_page'] = 5;
     $config['num_links'] = 4;
     $config['uri_segment'] = 3;
  
     $this->pagination->initialize($config);
  
     $links=$this->pagination->create_links();
    
     echo $this->table->generate($query);
    
     echo $links;
  
   }
    
}
I used htacces to remove index.php from the url.
Could this be a problem ?

Can you please tell me where is the mistake ?
Or is it a bug ?
The problem is the firspage link always appears to be higlighted.
If I click on the 3rd page it displays the correct results but the 1st page link remains higlighted.
Thanks to anyone kind enough to answer.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.