Update two at the same time...
How can I update two mysql databases (on two servers) at the same time. DO I need to give permission to send data?
E.g. The swf is in server A and I want to post data to 2 databases in server A and server B. But when I do it only updates in server A. Nothing goes to server B. How can I do this? Is this got to do with php? Please advice.
<?php
//SERVER A
$link = mysql_connect("localhost","abc","abc1");
mysql_select_db("my_db1");
$query = "INSERT INTO abc_db(subject, links) VALUES('$hsubjects','$link')";
$result = mysql_query($query);
//SERVER B
$links = mysql_connect("xxx.xxx.xx.xxx","xyz","xyz1");
mysql_select_db("my_db2");
$query = "INSERT INTO notice_db(subject, links) VALUES('$hsubjects','$link')";
$result = mysql_query($query);
$sentOk = "The data has been added to the database.";
echo "sentOk=" . $sentOk;
?>
