Example page for MyPagina class

The page navigation (pagination) of lists with records from a (MySQL) database is often used on a lot of dynamic websites. This class is extremely easy to use in your existing application: just use your own SQL statement and voila you get information like the result set (you need this for later output, page navigation links and the (current) number of records. While using this class all other query string parts are included inside the page links. An example database table (with data) is included.

This information shows the current range of records and the total number of records.

rec. to of 64


Here the records (id and titel):

 1 -> Download.com
 2 -> Macromedia Inc.
 5 -> HotScripts.com
 6 -> Construsoft BV
 7 -> PHP.net
 8 -> MySQL
 9 -> Yahoo.com
10 -> Lycos
13 -> Adobe Systems Inc.
19 -> BERG Toys BV
22 -> WWW Consortium
24 -> PHP Builder
27 -> Webmaster toolkit
28 -> BERG Trampoline
29 -> Regular Expression Library

The navigation() method is showing this kind of links:

<< 1 | 2 | 3 | 4 | 5 >>

Notice the large number of the current link, you can modify the style with CSS.

The back_forward_link() method, shows only for- and backward links (you can use it for small recordsets):
(this example is using images)