Show More details without refresh using Ajax

In this post, we will see how we can load more post details list with the help of Ajax. This technique helps us to load the page quickly. At the initial page load time have some limited post details only. Whenever the show more button click it will load specified list of the post at the end of the post list container. Show more method is very useful because the data is loaded without loading the page.

Using MySQL select query with limit option help us to get the required count of the post from Database. The limit option has two keys. One is starting position of record position in the total record. The second one is a count of record wants to get from the selected list.

Step 1: Define a post display area with an initial set of records using PHP and MySQL with a limit option. Select query with limit option use to fetch no. of rows from database.

html veiw page format

Step 2: Write an Ajax script to get the records from Database and append the response data into post display area.

Step 3: Define a request handling PHP script for getting the records and response for the request.

Download   Demo

Learn Infinity

Learn Infinity is the most famous Programming & Web Development blog. Our principal is to provide the best online tutorial on web development. We execute the best tutorials for web experts this will help developers, programmers, freelancers and proving free resource you can download or preview the tutorials.

Leave a Reply

Your email address will not be published.

Back to top