/ Published in: PHP
This function can be used to sanitize single string variable or massive like POST, GET, COOKIE. It performs magic quotes gpc check, strip tags, trim and escape the dangerous signs with mysql_real_escape_string.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function str2db($input, $strip_tags=true) { foreach($input as $key => $value) { $input[$key] = str2db($value); } } else { } else { } } if($strip_tags) { } } return $input; }