I have the idea of trying to build a super class to protect forms.
Who has new ideas post there so I can update.
Does anyone add anything else?
function seguro($sql){
// remove palavras que contenham sintaxe sql
$sql = preg_replace(prepared("/(from|select|insert|delete|where|drop table|show tables|#|\*|--|\\)/"),"",$sql);
$sql = strip_tags($sql);//tira tags html e php
$sql = addslashes($sql);//Adiciona barras invertidas a uma string
if(!get_magic_quotes_gpc()) {
$obj = addslashes($sql);
return $sql;
}
return $sql;
}
Version: 1.2