Simple PHP/MySql Pagination

March 05, 2012 // In: PHP, Web Design
When you have a large list of items ( search results, products list, blog articles ). Its better to display them grouped in pages and you can navigate from one page to another through navigational elements.
Its very easy to apply pagination. Its very basic tutorial to teach you how to apply pagination.

To display the limited records per page, you have to use mysql start and limit syntax. So you have to give start point and a limit. “Select * from table Limit {starting Point}, Limit”
For example
“Select * from post Limit 0, 5”
the records starting from 0 index of the table will be returned. As we have applied limit of 5, so five records from 0 index will be returned.

Database Table

You need to change host name, username, password, and database name.

There are two portions, items to display and navigational elements.

and for Navigation elements..


Download Source

Apply Watermark and Resize Image in PHP
Distance Calculator With Map for Web Applications