Try to make a file that contains the two connections. Like this:
//Save as dbinfo.inc.php
<?php
$Connection1 = mysql_connect("localhost","xxx","xxx");
$Connection2 = mysql_connect("www.yourserver.com","xxx","xxx");
?>
Then, include this in your other scripts-. When you make a mysql_query, you specify the connection upon the one to make it like:
$q = mysql_query("SELECT * FROM tbl",$Connection1);
$q2 = mysql_query("SELECT * FROM tbl2",$Connection2);
Hope this helps
fLIPIS