Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- if(!function_exists("antiSQL")) {
- function antiSQL($campo, $adicionaBarras = false) {
- $campo = preg_replace("/(from|alter table|select|insert|delete|update|were|drop table|show tables|#|\*|--|\\\\)/i","Anti Sql-Injection !",$campo);
- $campo = trim($campo);
- $campo = strip_tags($campo);
- if($adicionaBarras || !get_magic_quotes_gpc())
- $campo = addslashes($campo);
- return $campo;
- } }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement