I have a sales archive in mysql; interrogated by php. I also have pdfs of every invoice. I would like the user to enter the invoice number and display the pdf. I have got bits of the solution, but not all.
The attached code shows what I have. The top section (commented out) shows how I can call the invoice number('filename') from the invoice.php page. This works
The second section calls a predetermined pdf file ('review.pdf'). This works, too.
What I need to do is replace the predetermined part with the $_POST part; but I am completely lost!
Does anyone know how I can do this?
//echo 'Invoice ' .$_POST['filename'] ;
<title>Download a PDF file</title>
//**** This section opens the pdf
header("Content-Disposition: attachment; filename=http://localhost//review.pdf");
//**** pdf end