0 down vote favorite
Now i want to transverse POST data in a.com/a.php to b.com/b.php.suppose a.php has a form.
<form method="post" action="">
name: <input type="text" name="name" /><br />
email: <input type="text" name="email" />
the following is my code php code part in a.php. how to receieve the transversed data in b.com/b.php
$url = 'http://www.b.com/b.php';
$fields = array(
'username' => addslashes($_POST['name']),
'email' => addslashes($_POST['email']),
'ip' => $_SERVER['REMOTE_ADDR']
$ch = curl_init();
$result = curl_exec($ch);
how to write the form action part? is there something wrong with my code? thank you.