2/3/2012 Update: PHP AJAX Pagination (PDO Version)
2/2/2012 Update: PHP AJAX Pagination (MySQLi Version)
Hi there! Today we are going to do a very simple yet useful script for your web apps:
- This code will load the paginated data via AJAX (We'll have some loader image to make it look good and user friendly).
- Paginated data was returned by our PHP script with the help of a Modified PS_Pagination Class (Yes, I modified it myself since I want to use this Awesome pagination class with jQuery.)
|Easy browsing of pages|
Step 1:Prepare you data. We're gonna use the following table structure. Just add you own data.
Step 2: Prepare your loader image, jQuery library and our modified PS Pagination library. I will not copy the pagination library codes here. You may just download the code package of this tutorial and you may compare it to its original code by downloading it here.
Step 3: Our User Interface will be represented by our index.php file:
Step 4: This will be the code inside our search_results.php file where our modified pagination class was used.
Step 5: As for the CSS, I used the following:
Well that's it. :)