, , ,

How to hamper the “Confirm form resubmission” dialog box on the localhost PHP file?

Posted by

Suppose, you’re doing crud operations through PHP and inserting certain sorts of data into the database through a localhost PHP file. And you find the Confirm form resubmission dialog box at the apex of the PHP page. You will find like below-mentioned image which I have mentioned besides below:

Confirm Form Resubmission Dialog Box

If you will apply the below-mentioned code in your PHP file under the javascript code then you will get rid of all duplicate data from your localhost PHP page and it works in my PHP code. I’m sure, it will really work on your PHP code.

 <script>
          if ( window.history.replaceState ) {
         window.history.replaceState( null, null, window.location.href );
          }
        </script>
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x