i havent tried this in a long time, but something like this should work according to the php manuals..
PHP Code:
$server1 = mysql_connect("host", "username", "pass");
$dbserver1 = mysql_select_db("server1");
$server2 = mysql_connect("host2", "username", "pass");
$dbserver2 = mysql_select_db("server2");
$query = mysql_query("SELECT * FROM test", $server1); // server1
$query2 = mysql_query("SELECT * FROM Test2", $server2); // server2
$res1 = mysql_fetch_array($query); // $res1 is the array containing data from the test table
$res2 = mysql_fetch_array($query2); // $res2 is the array containg data from the Test2 table.
echo "<pre>server1: <BR>" . print_r($res1) . "<BR> server2:" . print_r($res2) . "</pre>";
mysql_close($server1);
mysql_close($server2);