if (function_exists('mysql_real_escape_string')) {
// The new and improved version
+ //* DEBUG: */ echo __FUNCTION__.":str={$str}<br />\n";
return mysql_real_escape_string($str, $link);
} elseif (function_exists('mysql_escape_string')) {
// The obsulete function