<?

function ConnectDB($server,$username,$password,$database) {
    $connection = @mysql_connect($server,$username,$password);
    
    // If there is an error, report it!
    if (!$connection) {
        die("I'm sorry I couldn't make a connection to the server: $server");
        return false;
    }
     
    // If there is an error, report it!
    if (!mysql_select_db($database,$connection)) {
        die("I'm sorry I couldn't locate the database: $database");
        return false;
    }
    
    return $connection;
}

function DisconnectDB($connection) {
    $value = mysql_close($connection);
    return $value;
}

?>