I've never implemented something like this before but I'm in need of a simple way of modifying my searchdb.php
file. My site is already live and I'm in need of a quick fix (minimal changes, preferably to one file (newbie developer here).
searchdb.php
is called when a form is submitted to look up and return some json object:
//connect do database
//parse post
//sql
//return as json
//mysql_close();
What are my options? I know I can wrap it in a if statement and use die()
but I'm not sure what condition to use.
EDIT: After reading http://en.wikipedia.org/wiki/Query_flooding
Query flooding is a method to search for a resource on a P2P network. It is simple but scales very poorly and thus is rarely used.
Do I really need to prevent this?