Location: PHPKode > projects > Wiki-Map > htdocs/admin/openDB.php
<?	
	$db_host = 'localhost';
	$db_owner = 'root';
	$db_passwd = 'toton';
	$db_base = 'wikimap';
	if ($_SERVER[HTTP_HOST]=='www.wikimap.biz'){
		$db=mysql_connect ("localhost", "wikimap_webmain", "crow2fly") 
					or die ('I cannot connect to the database because: ' . mysql_error());
		$sdb = mysql_select_db ("wikimap_main")  or die("Err:DB ".mysql_error()."<BR>");
	} else {
		$db=mysql_connect ("localhost", "wikimap", "toton") 
					or die ('I cannot connect to the database because: ' . mysql_error());
		$sdb = mysql_select_db ("wikimap") or die("Err:DB ".mysql_error()."<BR>");
	}

	/*
 	$db = mysql_connect($db_host, $db_owner, $db_passwd);
	if (!$db) {
   		die('Could not connect: ' . mysql_error());
   		exit;
	}	

	$sdb = mysql_select_db($db_base,$db)  or die("Err:DB ".mysql_error()."<BR>");
	*/
	
?>
Return current item: Wiki-Map