function InitDB() { $db = new DBServer(DBUSER, DBPWD, DBSERVER); if (!$db->SetDB(DBNAME, true)) { $db->Create(DBNAME); echo "Created new database : " . DBNAME . "<p>"; $db->SetDB(DBNAME); } return $db; }