Basically, the general idea is to redirect the user to some other pages after the form submission which would stop the form resubmission on page refresh but if you need to hold the user in the same page after the form is submitted, you can do it in multiple ways. Unset Form Data I'm attaching my php test file but this is a JS problem. When I scroll down in the web page and the meta refresh hits, in Windows Safari and IE6/7/8 browsers, the web page re-positions back to the top.
Here we'll see how to create new elements "on the fly" and modify the existing page content. Example: show a message. Let's demonstrate using an example. We'll add a message on the page that looks nicer than alert. Here's how it will look: