// UTF-8 Supporting dbconnect edited by ozzWANTED @ PhpFusion-Lt.com
function dbconnect($db_host, $db_user, $db_pass, $db_name, $charset="utf8") {
global $db_connect; $db_connect = @mysql_connect($db_host, $db_user, $db_pass);
$db_select = @mysql_select_db($db_name);
if (!$db_connect) {
die("<strong>Unable to establish connection to <span style="border-bottom: 1px dotted black;">MySQL</span></strong><br />".mysql_errno()." : ".mysql_error());
} elseif (!$db_select) {
die("<strong>Unable to select <span style="border-bottom: 1px dotted black;">MySQL</span> database</strong><br />".mysql_errno()." : ".mysql_error());
}
// SET CHARSET
if (!function_exists('mysql_set_charset')) {
mysql_query("SET NAMES $charset");
} else {
mysql_set_charset($charset);
}
}