Search and Pagination - Error - 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: Search and Pagination - Error (/showthread.php?tid=21813) |
Search and Pagination - Error - El Forum - 08-21-2009 [eluser]Unknown[/eluser] Hi, I try to search in my system library system search by author,book name.And i wrote these codes for searching . Controller Code: function searchbyauthor() Model Code: <?php View Code: <!--[if !IE]>start row<![endif]--> And button Code: <span class="button blue_button search_button"><span><span>Search for Me</span></span><input name="" type="submit" /></span> It's working correctly but i cant added pagination into that system.How can i add or config search result ll be in pagination page. Thanks,sorry for English Search and Pagination - Error - El Forum - 08-21-2009 [eluser]Jondolar[/eluser] Since clicking on a pagination link will load another page and thus lose your search post, you need to somehow pass the original search string back to the page along with the new page number. You can either store the search string in a session or cookie variable when the original search is made or you can add the search string as a parameter to the url you are navigating to (?search=book). Every one of your pagination links must have this parameter in order for it to work. Search and Pagination - Error - El Forum - 09-03-2009 [eluser]Unknown[/eluser] Thanks alot. It works now =) |