one submission page, post the content to two site ?
Posted: Wed Sep 16, 2009 7:25 am
one submission page, submit the content to two site at the same time. can you make it help me?How?
-----------------------------------------------------------------
submit page (test.php)
// action="http://localhost/one/test1.php" and action="http://localhost/two/test2.php"
------------------------------------------------------------------
accept page1 (test address: http://localhost/one/test1.php)
-------------------
accept page2 (test address: http://localhost/two/test2.php)
-----------------------------------------------------------------
-----------------------------------------------------------------
submit page (test.php)
Code: Select all
<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>------------------------------------------------------------------
accept page1 (test address: http://localhost/one/test1.php)
Code: Select all
<?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)
Code: Select all
<?php
$fp = fopen("test2.txt","a");
$name1=$_POST[name1];
$name2=$_POST[name2];
$str = "name1: ".$name1." name2: ".$name2."\r\n";
fwrite($fp,$str);
fclose($fp);
?>