I believe the solution is simple.
From the php manual
resource mysql_connect ( [string server [, string username [, string password [, bool new_link [, int client_flags]]]]])
So you should change the code to:
$database_connection1 = mysql_connect("localhost", "*", "*",1) or die ("Could not connect");
$database_connection2 = mysql_connect("localhost", "*", "*",1) or die ("Could not connect");
Notice the 1 after the password. This tells php to use a new connection and keep the old. Rather than reuse the old.
Note: The new_link parameter became available in PHP 4.2.0
Another point to remember is that you don't need to mysql_select_db as long as you specify the dbase IN the query string.
For example if I have
dbase1
tableA
tableB
dbase2
tableC
tableB
I can query with
"SELECT count(ID) FROM dbase1.tableA WHERE ..."
then without reselecting dbase
"SELECT count(ID) FROM dbase2.tableC WHERE ..."
Notice how I specify the dbase I'm using inside the query.