Codice 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/mysql_connect
http://www.php.net/header