function mysqlstring($string){ if (get_magic_quotes_gpc()){ $string = stripslashes($string); } return mysql_escape_string($string); }