host = $host; $this->user = $user; $this->password = $password; $this->name = $name; } function connect() { $this->connection = mysql_connect($this->host, $this->user, $this->password) or die('DB Connction error'); mysql_select_db($this->name, $this->connection); } function execute($query) { $this->connect(); $this->result = mysql_query($query, $this->connection); if (!$this->result) { echo "Query Error: $query"; exit; } $this->close(); return $this->result; } function close() { mysql_close($this->connection); } } ## End DB Class ################################################################################### ?>