How to upload Image file using AJAX and jQuery

In PHP you can easily upload any type of file on the server using the move_uploaded_file() method.

But it requires a form submit for uploading the selected file.

If you want to store an image file and display preview without reloading the whole page then you need to use jQuery AJAX.

Send the selected file using the FormData object in the AJAX request.

How to upload Image file using AJAX and jQuery

Read more

AJAX Pagination with jQuery and PHP

With pagination, you can divide the large list of records into multiple pages.

The user will only view specific numbers of records at a time and require to navigate to view another list of pages.

You can create this with the only PHP or use jQuery AJAX to load pagination data without page reload.

In this tutorial, I am using jQuery AJAX to create pagination.

In the demonstration, I am creating a table layout to display the list of records and use next and previous buttons to navigate.

Ajax Pagination with jQuery and PHP

Read more

Check Username Availability with jQuery and AJAX

If you are allowing the user to login with their username and password then you have to make sure that every user has a unique username.

When the user goes for registration on your site check username either after form submits or check it with AJAX while entering.

In this tutorial, I am using jQuery AJAX to check username is available or not.

Check Username Availability with jQuery and AJAX

Read more