bump for above post.
Also, in what way can I make the code more efficient?

function clean($str) {
$str = trim($str);
if(!mysql_real_escape_string()) {
$str = addslashes($str);
}
$str = strip_tags(htmlspecialchars($str));
return $str;
}
Security risk.
function clean($str) {
$str = trim($str);
if(!get_magic_quotes_gpc()) {
$str = addslashes($str);
}
$str = strip_tags(htmlspecialchars($str));
return $str;
}
Last edited by Jxhn; 21-04-2009 at 06:19 PM.
Erm? I don't remember telling you anything about that, I never use "!mysql_real_escape_string" I either use "function_exists" or "get_magic_quotes_gpc". Anyway most of my code uses strict checking too so I doubt it's me who said it.
I probably didn't tell you not to use it, but not to rely on it.
Want to hide these adverts? Register an account for free!