I have a PDF Form that uses php to send the completed form to a file on my server. That way, I can see the completed form and not just the code in an e-mail. I want to php code to take care of sending the form to the server (it does), but then to continue to a payment page. I can't figure out how to do this. I use echo to print a short message and link to the payment page, but would rather skip this middle page.
Thanks for your help in advance!<?
//Step 1: Get the XFDF Raw Data
$XFDFData = file_get_contents('php://input');
//Check it to see if it is empty or too short
if ( strlen($XFDFData)<10)
{
header("Location: http://www.pdfill.com/pdf_action.html#4");
exit;
}
// make the random file name
$randName = md5(rand() * time());
$File = 'Submitted_Forms/' .$randName . '.pdf';
$Handle = fopen($File, 'w');
$Data = $XFDFData;
fwrite($Handle, $Data);
fclose($Handle);
$strLink = "http://www.revbootcamp.com/$File";
// echo $strLink;
$to = 'tlctara@comcast.net';
$subject = 'New Registration Form';
$message = 'A new case form has been submitted. Please click the link to view.
' . $strLink;
$email = 'bruce@revbootcamp.com';
$headers = 'From: ' . $email . "\r\n" .
'Reply-To: ' . $email . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail ($to, $subject, $message, $headers);
echo "<a href='http://www.revbootcamp.com/Payment.html'>Thank You for your submission. Click Here To Pay</a>";
?>