mysql_connect("REMOTEHOST","HOSTUSER","HOSTPASS") or DIE("Unable to connect to server");
@mysql_select_db("DATABASETOCONNECTO") or DIE("Unable to connect to database");
Change remotehost to the remote server ip.
hostuser to the mysql user on the remote server.
hostpass to the mysql password on the remote server.
and databasetoconnecto to the name of the database to connect to.