replace mysql_escape_string with the characterset safe mysql_real_escape_string.