Creating facebook / twitter style pagination


In this article you will learn how to create pagination like Facebook / Twitter. You should have knowledge in PHP, MySQL, CSS, jQuery, Ajax to understand this article.


Lets begin…

* First create a database named “count”.

* Create a table named “numbers” on the database we have created and add fill data to the table from one to twenty as 20 records(rows).

SQL Query is as below…

We are going to show this 20 records in pagination like facebook.

* Also generate a new loading GIF icon here

* Create config.php file and place the following code

* Create pagination.php file and place the following code   

* Create getmore.php file and place the following code

Now execute the pagination.php file and see the output. Please checkout the video tutorial for coding explanation.

Video Tutorial

Share on :