0

I have clarification regarding the form submit. When a page is submitted and again, when we refresh again, I should not post it again.

How can I do it? How can I avoid the user from submitting the form again?

It may be refresh or anything which allows the user to submit the form again.

Bijoy Thangaraj
  • 5,434
  • 4
  • 43
  • 70
PCA
  • 1,677
  • 6
  • 28
  • 45
  • 1
    possible duplicate of [Avoid resending forms on php pages](http://stackoverflow.com/questions/8882808/avoid-resending-forms-on-php-pages) (the solution is independent of any particular server side technology, but you need to do this server side). – Quentin Nov 05 '12 at 07:01
  • possible duplicate of [How do I stop the Back and Refresh buttons from resubmitting my form?](http://stackoverflow.com/questions/665399/how-do-i-stop-the-back-and-refresh-buttons-from-resubmitting-my-form) – Jonathon Reinhart Nov 05 '12 at 07:02
  • please look at threads: http://stackoverflow.com/questions/1317486/how-to-avoid-resubmit-in-jsp-when-refresh and http://stackoverflow.com/questions/926816/how-to-prevent-multiple-form-submit-from-client-side – Chinmayee G Nov 05 '12 at 07:03

2 Answers2

0

On the front end, you could disable the submit button after submission.

On the server side, you could assign a unique id or generated random key which you could check for duplicates.

jhoanna
  • 1,797
  • 25
  • 25
0

One thing what you can do is that in your server, you can look for the ip address from which the request is coming and have a specific interval set between similar requests are sent from the same user.

If you are using PHP, you can look for in $_SERVER['REMOTE_ADDR'] to get the ip address.

Bijoy Thangaraj
  • 5,434
  • 4
  • 43
  • 70