Forum Moderators: coopster
Its called pagination. If you do a search on Google you should find some tutorials. I think there is one at Codewalkers. Or maybe it was PHP Freaks. Another thing you can try is to download a script that has page numbers (such as a guestbook script) and take a look at the code.
Its not actually too hard. You`ll need two queries, one for the total count of rows, the second with a start limit and an end limit. A little calculation using some mathematical operands and you are good to go.
Good luck.
The page links can be printed out(finally). However there is the "Undefined variable: PHP_SELF" error.
When I changed the " to '. The error is gone. But now they were linked as [localhost:81...] How do I solve this problem? And when I manually change the $PHP_SELF to index.php in the address bar to see if it will work, it does not.
[edited by: ergophobe at 5:08 pm (utc) on Jan. 31, 2005]
[edit reason] code dumped snipped - copyright issues [/edit]