hostdb = $host; $this ->userdb = $user; $this->dbname = $db; return mysql_connect("$host","$user") or die("cannot connect to database"); } } ?>