Some thoughts:
You need to gather a list of database locations all the forums are located on since this is what you will be querying.
In addition, in the database should be a table where the forum names are stored.
If the problem is to simply look for forum name on one of "N" databases, then it should be straightforward.
B Create a HTML form[/B]
Name this file ForumSearch.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Forum Search</title>
</head>
<body>
<h1>Forum Search</h1>
<form action="ForumSearchProcess.php" method="post" name="formForumSearch" id="formForumSearch">
<table width="300">
<tr>
<td>Forum name </td>
<td><input name="txtForum" type="text" id="txtForum"></td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td><input type="submit" name="Submit" value="Submit"></td>
<td> </td>
</tr>
</table>
</form>
<p> </p>
</body>
</html>
BHandle the search logic[/B]
Name this file ForumSearchProcess.php
// Check to see if submit button was pressed
if (!isset($_POST["submit"])
{
echo "Illegal access.";
return;
}
// Setup database parameters
// Assume there are three databases on three separate database servers
$dbInfo["Server1"]["host"] = "hostname";
$dbInfo["Server1"]["username"] = "username";
$dbInfo["Server1"]["password"] = "password";
$dbInfo["Server1"]["dbname"] = "databasename";
$dbInfo["Server2"]["host"] = "hostname";
$dbInfo["Server2"]["username"] = "username";
$dbInfo["Server2"]["password"] = "password";
$dbInfo["Server2"]["dbname"] = "databasename";
$dbInfo["Server3"]["host"] = "hostname";
$dbInfo["Server3"]["username"] = "username";
$dbInfo["Server3"]["password"] = "password";
$dbInfo["Server3"]["dbname"] = "databasename";
// Now create the loop that would iterate through each server
// Checking for the forum name
$numServers = 3;
for ($serverNum = 1; $serverNum <= $numServers; ++serverNum)
{
$server = "Server" . $serverNum;
$dbHandle = mysql_connect($dbInfo[$server]["host"],
$dbInfo[$server]["username"],
$dbInfo[$server]["password"]);
if ($dbHandle == FALSE)
{
echo "Could not connect to dtabase";
return;
}
if (mysql_select_db($dbInfo[$server]["dbName"], $dbHandle) == FALSE)
{
echo "Could not select database";
return;
}
// Setup your SQL QUERY HERE
// to search on the forum database
// table for the forum name
$sql = " ";
$dbResult = mysql_query($sql, $dbHandle);
if ($dbResult == FALSE)
{
echo "Could not execute SQL";
return;
}
// If you found it, print out the server name or whatever you are trying to do
// then RETURN!
}
THIS IS A ROUGH SKETCH OF WHAT YOU NEED TO DO. FILL IN THE REST AND READ THE PHP MANUAL.