Pagination Links does not work, Please help! - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Pagination Links does not work, Please help! (/showthread.php?tid=28403) |
Pagination Links does not work, Please help! - El Forum - 03-10-2010 [eluser]Unknown[/eluser] Dear All, I am facing a problem with paging in codeigniter. I have setup the pagination in my project and able to place the (1,2,3,4 Next and Last) links through (this->pagination->create_links()) function. These links are working and fetching the required records from db however their appearance remains same. For instance, First link (ie. 1) is selected by default when i open the page and it remains selected if i click 2,3,4,5 or any other link whereas it should change the selected page to current link. Please help. Given below is code how i am doing this.... $query_suffix = "make=".$make."&model;=".$model."&priceFrom;=".$priceFrom."&priceTo;=".$priceTo."&showBy;=".$showBy."&x=".$_GET["x"]."&y=".$_GET["y"]."&counter;="; $this->load->library('pagination'); $config['base_url'] = 'http://testpage.com/search?'.$query_suffix; $config['total_rows'] = $this->db->count_all('car'); $config['uri_segment'] = 3; $config['per_page'] = '10'; $config['num_links'] = 3; $this->pagination->initialize($config); $data[0] = $this->db->get("car",$config['per_page'],$_GET["counter"])->result_array(); $data[1] = $this->pagination->create_links(); $page["pgMain"] = $this->parser->parse("search",$data, true, true); Pagination Links does not work, Please help! - El Forum - 03-13-2010 [eluser]iron-man[/eluser] please show your url address.. |