Re: Pagination need help again

From: Date: Sat, 13 Nov 2004 15:24:22 +0000
Subject: Re: Pagination need help again
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-201917@lists.php.net to get a copy of this message
* Scott McWhite <smcwhite@mchsi.com>: > I'm using an HTML search form that passes the "searchterm" to a php > file. > > In my case the "searchterm" can have 1000s of records in my database, > so I implemented a limit which displays 20 records per page. The > pagination function works fine with one exception. Example of my > problem: searchterm typed in the html search form equals "ford", in > the database there are 2000 fords, the first page displays 20 fords > and then the next page forgets that we are searching "fords" and > displays the equivalent to a wildcard "%" > > search and displays accordingly. I use PEAR's Pager class for this sort of thing. It's highly configurable -- which means it may take a few tries to get it working with your own code, but it *will* work, eventually. Browse for the Pager class at http://pear.php.net -- look in the HTML category. -- Matthew Weier O'Phinney | mailto:matthew@garden.org Webmaster and IT Specialist | http://www.garden.org National Gardening Association | http://www.kidsgardening.com 802-863-5251 x156 | http://nationalgardenmonth.org

« previous php.general (#201917) next »