0

Possible Duplicate:
How to handle multiple submissions server-side

How can I stop the submit form button from being pressed multiple times resulting in sending the data multiple times using PHP.

Community
  • 1
  • 1
HELP
  • 14,237
  • 22
  • 66
  • 100
  • possible duplicate of [How to handle multiple submissions server-side](http://stackoverflow.com/questions/218907/how-to-handle-multiple-submissions-server-side) and [a couple others](http://stackoverflow.com/search?q=prevent+multiple+form+submission) – Gordon Oct 07 '10 at 13:05
  • @Gordon very funny you should of used your own advice before posting your own comment. – HELP Oct 07 '10 at 13:05
  • @Gordon, @Gumbo♦ So I take it none of you could have let anybody else answer the question claiming its a duplicate? – HELP Oct 07 '10 at 13:10
  • Please dont take this personal. Your question was already asked and answered a number of times before, so there is no reason to ask it again. You are encouraged to refer to the answers given in the linked question instead. If you find none of these answers will help you, ask a new question and explain details and things that are of particular interest or difficulty to you. – Gordon Oct 07 '10 at 13:32

1 Answers1

0

With Javascript. Make use of the onclick event like this:

<input type="submit" onclick="this.disabled=true;" />
methode
  • 5,348
  • 2
  • 31
  • 42
  • I was hoping for PHP but this will do thanks. – HELP Oct 07 '10 at 13:11
  • PHP is server side and thus can't control what the client does. If you don't like the Javascript approach, go with the hints from the thread Gordon has linked to. – methode Oct 07 '10 at 13:17