Possible Duplicates:
PHP: the ultimate clean/secure function
What's the best method for sanitizing user input with PHP?
What should I add to my function to be sure that every string that passes it will be 'server-friendly'? I use this small function to check inputs that contains names, e-mail addresses and ids.
   function checkInput($str) {
        $str = @strip_tags($str);
        $str = @stripslashes($str);
        $str = mysql_real_escape_string($str);
        return $str;
    }
 
     
     
     
     
    