mercredi 1 avril 2015

Send data to url in form handler

I have a salesforce form, that sends form data to salesforce_url. I am implementing a form handler. How do I send data to salesforce-url in the form handler. In the basic form it would be sent via



<form action="salesforce-url" method="POST" role="form">


Now with the form handler I have the action set to:



<form action="/form-handler.php" method="POST" role="form">


In my form handler at form-handler.php how can I push the data to http://ift.tt/L0I4hY.


PS: Using google captcha and will be auto populating certain form variables to add to complexity. Below is my form-handler...



<?php

$email;$comment;$captcha;
if(isset($_POST['email'])){
$email=$_POST['email'];
}if(isset($_POST['g-recaptcha-response'])){
$captcha=$_POST['g-recaptcha-response'];
}
if(!$captcha){
echo '<h2>Please check the the captcha form.</h2>';
exit;
}
$response=file_get_contents("http://ift.tt/1xXFpRg".$captcha."&remoteip=".$_SERVER['REMOTE_ADDR']);
if($response.success==false)
{
echo '<h2>Please no spam, thank you.</h2>';
}else
{
header("Location: http://ift.tt/1NJg9lk");
}


?>


Aucun commentaire:

Enregistrer un commentaire