I am trying to integrate a wiki, forum, chat and user database all on 1 site. To connect to the database we use:
<?php
$host="localhost.sitename.com";
$user="user_name";
$password="password";
$database="site_database";
$connection = mysql_connect($host,$user,$password)
or Die ("Could not connect to Server.");
$db=mysql_select_db($database,$connection)
or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ("site_database");
?>
I need it to also connect to the 3 other databases and am wondering if I need to list each one with a separate $database and again mysql_select_db line or all in one with a , in between?
$database="site_database";
$database="chat_database";
$database="wiki_database";
$database="forum_database";
and
mysql_select_db ("site_database");
mysql_select_db ("chat_database");
mysql_select_db ("wiki_database");
mysql_select_db ("forum_database");
OR
$database="site_database","chat_database","wiki_database","forum_database";
and
mysql_select_db ("site_database","chat_database","wiki_database","forum_database");
???