Is it possible to post form data to a thank you page and then have the thank you page post the data somewhere else like an external CRM database? The thing is, I want to capture a copy of the form information as a backup before I send it to the CRM so if their service is ever down I don't lose any leads that are submitted. I just need to figure out how to re-post this data to the CRM behind the scenes.
EXAMPLE FORM/////////////////
<form action="thankyou.php" >
<input type="text" name="name">
<input type="text" name="email">
<input type="submit" name="submit">
</form>
EXAMPLE THANKYOU.PHP///////////////
<?PHP
$message = "Name: ";
$message .= $POST['name'];
$message .= "\r\n";
$message .= "Email: ";
$message .= $POST['email'];
$message .= "\r\n";
$subject = "New Form Submission";
$email = $_POST['email'];
$recipient = "me@domain.com";
$mailheader = "From: $email\r\n";
$mailheader .= "Reply-To: $email\r\n";
mail($recipient, $subject, $message, $mailheader) or die("Failure!");
----PHP to Repost data to to CRM URL behind the scenes without having to resubmit form----
?>
<HTML>Thank you message</HTML>
Thanks,
Dave