Possible Duplicate:
Best way to stop SQL Injection in PHP
I am curious what is the best way to prevent SQL injections through URL parameters - for example if the user visited http://mydomain.com/info.php?id='50
I am told the above URL with the parameter can allowed Brutal SQL injections, so what exactly is the best way of preventing this from happening?
Would sending the user to an error page when "or die" takes place prevent these SQL injection?