Find a line of code that gets the ID from the url, it will be like this:
$ID = $_GET["ID"];
Change it to:
$ID = (int) $_GET["ID"];
Or even better and safer, at the top of the script add this:
$_GET["ID"] = (int) $_GET["ID"];
When you cast to INT there is no way anyone will be able to inject any sql into that variable. You should also check whether that variable from the url is used through $_GET variable, and not by $_REQUEST, or even worse by parsing the $_SERVER["QUERY_STRING"] manually.
Make sure that ID is the only variable passed in the url to that script, if there are more, then you need to secure all of them.
Securing variables that accept only Integer values is easy, you just need to make this conversion. It will be harder when variable can be of any string, then you need to use mysql_real_escape_string() on that string or similar, depending what type of database and driver you use.
If you need a full blown universal solution to sql injections, take a look to my another recent answer, that explains how to use PDO extension along with automatic data binding to prevent injections, link below:
stackoverflow.com/questions/8105508/does-this-work-to-stop-sql-injections/8105598#8105598