About PHP Pagination class
This is a pagination class in PHP. This will be useful for pages showing table content from database page by page.
3 variation of classes.
1. class.pagination1.php – This will show all pages as links for the table (For 1000 records, if showing 10 records each page then it will show 100 page links)
2. class.pagination2.php – Shows particular number of pages (For total 100 pages, on page 50, it can be showing 45 to 55 page links only)
3. class.pagination3.php – Like the previous one (pagination2), also takes care of the query string with the url. (If the url contains any query string like members.php?status=active the the next page url will be members.php?status=active&page=2)
Check and Usage
1. Set config file (for database connection)
2. Include pagination class in your php file
3. Define variables passing to class (current page, results per page, sql of full result, page links to display)
4. Create Object and populate data
5. Display $pageObj->get_links() somewhere in the page
6. Edit css file for page links appearance