Prevent page from submit on Refresh in PHP

If the form is already submitted and the user tries to refresh the webpage then the browser will attempt to resubmit the form.

If you are allowing the user to fill and submit the form for insert data. In this case, if the user refreshes the page then the data is reinserted into the MySQL database table if some action does not perform for preventing it.

In this tutorial, I show you some ways by using which you can avoid the page resubmit.

Prevent page from submit on Refresh in PHP

Read more

Display Loading Image when AJAX call is in Progress

When an AJAX request is sent to fetch records from the server then it may take time depending on the data processing or the number of records.

If the AJAX request takes more time then at the Client-side there is no visible change is been displayed and the user doesn’t know whether its request is in progress or not.

You can display a loading image or text message on the page when the AJAX request is in progress and hide it after getting a response.

In the demonstration, I am displaying a loading image when sending an AJAX request.

Display Loading Image when AJAX call is in Progress

Read more