* Scott McWhite <[EMAIL PROTECTED]>:

> 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:[EMAIL PROTECTED]
Webmaster and IT Specialist       | http://www.garden.org
National Gardening Association    | http://www.kidsgardening.com
802-863-5251 x156                 | http://nationalgardenmonth.org

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to