function clean($string, $allow_html = false) { //$string = $string; //$string = htmlentities($string); if ($allow_html == false) { $string = strip_tags($string); $string = Replacer($string); } // $string = utf8_encode($string); return $string; }
function mysql_clean($id, $replacer = true) { //$id = clean($id); global $db; if (get_magic_quotes_gpc()) { $id = stripslashes($id); } $id = htmlspecialchars(mysqli_real_escape_string($db->mysqli, $id)); if ($replacer) { $id = Replacer($id); } return $id; }
function mysql_clean($id, $replacer = true) { if (is_array($id)) { $new_array = array(); foreach ($id as $key => $value) { $new_array[$key] = mysql_clean($value); } return $new_array; } //$id = clean($id); if (get_magic_quotes_gpc()) { $id = stripslashes($id); } $id = htmlspecialchars(mysql_real_escape_string($id)); if ($replacer) { $id = Replacer($id); } return $id; }