function connect() {
if ($this->_cnx == 0) {
require("dbconvars.php");
$this->_cnx = mysql_connect($dbhost, $dbuser, $dbpwd);
if (!$this->_cnx) {
$this->_handleError("Connect failed.");
return false;
}
if (@!mysql_select_db($dbname, $this->_cnx)) {
$this->_handleError("Can not select database '$dbname'.");
return false;
}
}
return $this->_cnx;
}