<?php
class database
    var $db_name;
    var $db_host;
    var $db_user;
    var $db_password;

function database(){
    $this->db_name="your_db";
    $this->db_host="your_host";
    $this->db_user="db_username";
    $this->db_password="db_password";
}

function connect(){
    $this->connect=mysql_connect($this->db_host,$this->dbusername,$this->db_password)
    or die (Couldn't connect to MySql);
    mysql_select_db($this->db_name) or die ("Couldn't open:".$this->db_name);
}

function Disconnect(){
    if(isset($this->connect)){
    mysql_close($this->connect);
}
?>