This is a script to make pagination in PHP like digg.com or flickr.com. This script was written by a guy from Shailesh Singh.
In this page I’ve edit the script a little bit to make it working and easy to edit.
My tutorial is just a guide how to implemente in your PHP script. The image below is what you’ll get after finished this code.
STEP1: The Code
Grab the code and paste in your text editor.
You have to customize 7 spots in this code (see images below).
1. Code to connect to your DB – place or include your code to connect to database.
2. $tbl_name – your table name.
3. $adjacents – how many adjacent pages should be shown on each side.
4. $targetpage – is the name of file ex. I saved this file as pagination.php, my $targetpage should be “pagination.php”.
View original post 676 more words