Hi all ,
I have one form, using this form, i am sending the data to one database server.
After sending the data, i want to send the information to other server(second server). how to do can anybody will help.
Thanks and regards
Ranjan
Hi all ,
I have one form, using this form, i am sending the data to one database server.
After sending the data, i want to send the information to other server(second server). how to do can anybody will help.
Thanks and regards
Ranjan
Do you mean you want to send to 2 different database servers, or do you want to send to one database server and then some script on a different server? If the first, simply make 2 sepearte sql connections (one after the other) and send the query like that. An example (using MySQL):
Hope this helps.Code:<?php //open the connection to 2 database servers $conn = mysql_connect("server1.host.com", 'username', 'password'); $connection = mysql_connect("server2.host.com', 'username', 'password'); //select the databases mysql_select_db('db1', $conn); mysql_select_db('db2', $connection); //execute the query mysql_query("INSERT INTO `table` VALUES ('null','1234')", $conn); mysql_query("INSERT INTO `table2` VALUES ('null','1234')", $connection); //close the connection mysql_close($conn); mysql_close($connection); ?>
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design
If you mean from one server(www.example.com) to another(www.example2.com), then you'd have to talk to your host(s) about doing that, although i highly doubt they'll allow it, considering that would be a big security risk.
but he could redirect to www.example2.com from www.example1.com.
in www.example2.com - insert data
and goback www.example1.com - insert data
???![]()
Bookmarks