<?php
/*
Note that this line: /F (http://www.mysite.com/CompletionForm.pdf)
determines the PDF File to be filled in.
*/
$txtName = $_GET['txtName'];
$txtCourseName = $_GET['txtCourseName'];
$txtCompletionDate = $_GET['txtCompletionDate'];
//FOR TEST
//echo $txtName;
//echo $txtCourseName;
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Cache-Control: public");
header("Cache-Control: private",false);
header("Content-Description: File Transfer");
header("Content-type: application/vnd.fdf");
echo <<<EOT
%FDF-1.2
1 0 obj
<<
/FDF
<<
/Fields
[
<<
/T (txtName)
/V ({$txtName})
>>
<<
/T (txtCourseName)
/V ({$txtCourseName})
>>
<<
/T (txtCompletionDate)
/V ({$txtCompletionDate})
>>
]
/F (http://appdevelsvr:8080/shquiz/media/certificate/SH_CertificateofCompletion.pdf)
>>
>>
endobj
trailer
<<
/Root 1 0 R
>>
%%EOF
EOT;
?>
ASKER
ASKER
ASKER
ASKER
PHP is a widely-used server-side scripting language especially suited for web development, powering tens of millions of sites from Facebook to personal WordPress blogs. PHP is often paired with the MySQL relational database, but includes support for most other mainstream databases. By utilizing different Server APIs, PHP can work on many different web servers as a server-side scripting language.
TRUSTED BY