Creating facebook / twitter style pagination

by   SJRANJAN

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.

fbstylepagination

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 http://www.ajaxload.info/

* 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

http://www.youtube.com/watch?feature=player_embedded&v=2Ha00Q9F4_w

Share on :