I believe this may be what you are looking for:
If your php is built with curl, it can be used to effectively forward the post variables to multiple scripts or sites.
Here is a test to demonstrate this:[php]
POST to other page using curl
<?php
if(isset($_POST['firstname'])) $posts['firstname']=$_POST['firstname'];
if(isset($_POST['submit']))
{
$ch = curl_init('www.yoursite.com/curltest2.php');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $posts);
curl_exec($ch);
echo '<pre>';
print_r($_POST);
echo '</pre>';
}
?>
[/php]
This will post the form back to the form’s page for processing. It will also send the same post variables on to a second page as determined by the address in the curlinit line.
To test this, I setup a table called curltest with a single column (VARCHAR 60) named “firstname”
I then put the following (with my db connection header) in the page that is referenced in the curlinit:[php]<?php
if(!empty($_POST[‘firstname’]))
{
$query = “INSERT INTO curltest
(firstname) VALUES (’$_POST[firstname]’)”;
mysql_query($query);
}[/php]
I then loaded the first page into the browser, typed a name in the form field, and hit submit.
The form posted back to itself and displayed the $_POST array correctly.
I opened up phpmyadmin and the firstname was correctly added by the curled page.
Please let me know if I have misunderstood what you are looking to do and I will try to come up with a different solution.
jay