http://www.php.net/mysql_connectCodice PHP:
$link = mysql_connect('server', 'user', 'password');
if (!$link) {
header('Location: http://'.$_SERVER['HTTP_HOST'].rtrim(dirname($_SERVER['PHP_SELF']), '/\\\\\\').'/errore_db.html');
die();
}
http://www.php.net/header