IMP_TWI;10897004 wrote:The reason I suggested F5+Enter was just as an example of one way someone can send multiple queries of the same kind with little effort. What I'm trying to stop is people from being able to refresh the same page (If it sends any type of query) and redirect them if they try to refresh the page (IE: You may not refresh this page, you will be redirected)
This have got nothing at all to do with DDoS attacks, or even DoS attacks. To me it seems that the real problem is that you don't want duplicate data in the database. My answer below assumes that this is correct.
Probably the best solution is to use a session variable, as bradgrafelman suggests. But you have to think about that it is possible to have more than one tab open with the same session, making it important to think about your design. One way to get around it is to use the same as this forum, a security token that is unique that you send as a hidden field into the form and then read again when you receive an answer. You then have the possibility to know if it was sent already or not.
By the way, next time please describe your problem in a clear way to start with instead of trying to use descriptions that you clearly don't know anything about. A good start is to learn how to ask questions the smart way.
As far as the server goes, it doesn't crash after a simple refresh, but any server will go down if someone can run a few hundred refreshes of the same query per second.
Not at all. We have stress tested servers with more than 10.000 queries per second without problems at work. With database access. And that are pretty small servers.