Hello,
I am looking after a solution in order to submit one register form and duplicate informations in an other database...
I tried something like that but it doesn t work correctly :
// Open the connection to the primary db
$res1 = mysql_connect($host1, $user1, $pass1);
mysql_select_db($db1);
// Open connection to the license server
$res2 = mysql_connect($host2, $user2, $pass2);
mysql_select_db($db2, $res2);
// Pull license data and close when done
mysql_query($check_sql, $res2);
...
mysql_close($res2);
// Now pull content from the primary db
// Not specifying the resource should default to the last open db
mysql_query($query);
Turns out this last query, since it cant find an active connection, will try to connect with mysql_connect() with no paramaters.
It seems that is not possible to do it with mysql_close()
Maybe somebody have a solution for a such trick
Happy New Year !!!