I had this problem a while ago, when you try to create the second connection
to the database with the same login credentials, i.e username and password.
If mysql / php detect there is a connection already established with those
details it will return that specfic resouce and not create an new
connection. The only way around this is to create a new username + password
for this database and use those details to generate the second connection.
Actually, the mysql_connect() function takes an optional fourth argument indicating whether or not a new connection should be made. If omitted, then PHP will do exactly what you are describing. If set, then PHP will create a new connection, even if the same username/password/host combination is being used.
Larry