exactly how do ns clean details in a form after send so the it walk not present this error after a page refresh?

See picture (from chrome):


The dialog has the text:

The web page that you"re looking for used info that you entered. Return to that web page might reason any activity you required to be repeated. Do you desire to continue?

I desire this dialog not to appear.

You are watching: Data again, but by doing so you will repeat



Edit: It"s been a few years due to the fact that I initially posted this answer, and also even despite I gained a couple of upvotes, I"m not really happy v my previous answer, for this reason I have redone the completely. I hope this helps.

When to use GET and also POST:

One way to get rid of this error blog post is to make your kind use GET instead of POST. Just keep in mind the this is not always an suitable solution (read below).

Always usage POST if you room performing an action that girlfriend don"t desire to be repeated, if sensitive info is being moved or if your type contains one of two people a file upload or the length of all data sent out is much longer than ~2000 characters.

Examples of once to use write-up would include:

A login formA call formA submit payment formSomething the adds, edits or deletes entries from a databaseAn image uploader (note, if using acquire with an field, only the filename will be sent to the server, which 99.73% of the moment is no what friend want.)A form with plenty of fields (which would develop a lengthy URL if utilizing GET)

In any of these cases, friend don"t want people refreshing the page and re-sending the data. If friend are sending out sensitive information, using get would not just be inappropriate, it would certainly be a security concern (even if the kind is sent out by AJAX) due to the fact that the perceptible item (e.g. User"s password) is sent out in the URL and will because of this show increase in server accessibility logs.

Use GET for basically anything else. This means, once you don"t mind if it is repeated, because that anything the you could administer a direct link to, once no sensitive details is gift transferred, once you are pretty certain your URL lengths are not walking to gain out the control and also when your creates don"t have actually any paper uploads.

Examples would certainly include:

Performing a find in a search engineA navigation kind for navigating about the websitePerforming one-time actions making use of a nonce or single use password (such together an "unsubscribe" link in an email).

In this cases write-up would be totally inappropriate. Imagine if find engines used write-up for their searches. You would receive this post every time girlfriend refreshed the page and also you wouldn"t be able to just copy and paste the outcomes URL to people, they would have to manually fill out the kind themselves.

See more: Hangar One Steak House Wichita Ks 67209, Hangar One Steakhouse

If you use POST:

To me, in most instances even having actually the "Confirm form resubmission" dialog popular music up mirrors that there is a architecture flaw. By the an extremely nature of write-up being offered to perform disastrous actions, web developers should protect against users from ever before performing them much more than when by coincidentally (or intentionally) refreshing the page. Many users carry out not even know what this dialog method and will therefore just click on "Continue". What if the was ~ a "submit payment" request? go the payment acquire sent again?

So what execute you do? happily we have the Post/Redirect/Get architecture pattern. The user submits a post request come the server, the server redirects the user"s browser to an additional page and that page is then retrieved using GET.

Here is a an easy example using PHP:

if(!empty($_POST<"username"> && !empty($_POST<"password">)) $user = new User; $user->login($_POST<"username">, $_POST<"password">); if ($user->isLoggedIn()) header("Location: /admin/welcome.php"); exit; else header("Location: /login.php?invalid_login"); Notice just how in this example even when the password is incorrect, i am quiet redirecting earlier to the login form. To screen an invalid login article to the user, just do miscellaneous like: