Pradinis
Pagalba
Užsisakyk!
- Reklamą
- Hostingą
- El. pašto dėžutę
Užsisakyk!
Įrankiai
Pasidalink
- Visos temos
// 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("<div style='font-family:Verdana;font-size:11px;text-align:center;'><strong>Unable to establish connection to MySQL</strong><br />".mysql_errno()." : ".mysql_error()."</div>");
} elseif (!$db_select) {
die("<div style='font-family:Verdana;font-size:11px;text-align:center;'><strong>Unable to select MySQL database</strong><br />".mysql_errno()." : ".mysql_error()."</div>");
}
// SET CHARSET
if (!function_exists('mysql_set_charset')) {
mysql_query("SET NAMES $charset");
} else {
mysql_set_charset($charset);
}
}