Auto Loading Records With PHP Using Ajax

Auto loading record is very important functionality to updated page based on window scroll,in real scenario you can see more post loading on Facebook wall, whenever you reach at the end of page.The functionality is whenever the vertical scroll down the records will update more records.We will use jQuery to get records async manner.You can download source code at the end of tutorial.


Step 1: We will create table which will contains all records and add some dummy records into MySQL table.

Step 2: We will call jquery into index file head section of index.php file.

Step 3: We will create connection file and call into ajax PHP file and index file.

You need to change connection object value as per your database credentials.

Step 4: We will call jquery ajax call into index file and add event for window scrolling.

Step 5: We will call additional jquery ajax into index file for first time records display.

You can download source code and see Demo from below link.