lovu Posted September 16, 2009 Share Posted September 16, 2009 one submission page, submit the content to two site at the same time. can you make it help me?How? ----------------------------------------------------------------- submit page (test.php) <table><form name="form" method="post" [color=#40BFFF][b]action=""[/b][/color] > <tr><td>name1: <input type="text" name="name1" ></td></tr> <tr><td>name2: <input type="text" name="name2"></td><td><input type="submit" name="submit" value="ok"></td></tr></form></table> // action="http://localhost/one/test1.php" and action="http://localhost/two/test2.php" ------------------------------------------------------------------ accept page1 (test address: http://localhost/one/test1.php) <?php $fp = fopen("test1.txt","a"); $name1=$_POST[name1]; $name2=$_POST[name2]; $str = "name1: ".$name1." name2: ".$name2."\r\n"; fwrite($fp,$str); fclose($fp); ?> ------------------- accept page2 (test address: http://localhost/two/test2.php) <?php $fp = fopen("test2.txt","a"); $name1=$_POST[name1]; $name2=$_POST[name2]; $str = "name1: ".$name1." name2: ".$name2."\r\n"; fwrite($fp,$str); fclose($fp); ?> ----------------------------------------------------------------- Link to comment https://forums.phpfreaks.com/topic/174452-one-submission-page-post-the-content-to-two-site/ Share on other sites More sharing options...
Garethp Posted September 16, 2009 Share Posted September 16, 2009 http://www.w3schools.com/Ajax/Default.Asp Link to comment https://forums.phpfreaks.com/topic/174452-one-submission-page-post-the-content-to-two-site/#findComment-919459 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.