I would like to know how you can make your own site COMPLETELY secure to the attacks of type Sql Injection. I read that it would be enough to enable the magic quote gpc in the htaccess file. Is this enough? There are other tricks? How to understand if a script is open to Sql Injection? For example, this snippet is closed to the attacks sql jection?
$sql = $_REQUEST['id'];
$sql = mysql_real_escape_string($sql);
$Query = "DELETE FROM Y WHERE id = ".$sql;
For example, large sites like facebook or google how to prevent this type of attack? Sorry for my english...
P.S. i'm not able to program with the paradigm OOP