I have a value from a row in MySQL called ($)lesson_title… I want this value to be the file name for a PDF file generated by FPDF sent by the header instead of a generic file name. Here is what the header in the pdf.php file currently sends:
/*
* Write PDF content to file.
*/
$pdf->Output($lessonPlanFile, 'F') ;
header('Content-type: application/pdf');
header('Content-Disposition: attachment; filename="My_Lesson_Plan.pdf"');
Where “My_Lesson_Plan.pdf” should be the value of $lesson_title
Sounds simple enough and I’ve tried quite a few things but can’t get the syntax right. =/
More info on string interpolation:
http://www.php.net/manual/en/language.types.string.php