Hi again. In the following code, which is being used to view pdf in browser
Is it possible to change the line:
so that the variable gains the value of another variable which will get its value from a table?
For example if i have this record on a table (which displays all the records in a db):
id=1;
name=marley.pdf ;
type:pdf;
size:xxx mb;
If i click on the name of the file i want a variable that will get that name and put it into the code.
the code would be something like this:
I hope you understand what i am trying to ask here...
Peace,
Slaxer13
Code:
<?php
$file = 'uploads/.pdf';
$filename = 'yolo.pdf';
header('Content-type: application/pdf');
header('Content-Disposition: inline; filename="' . $filename . '"');
header('Content-Transfer-Encoding: binary');
header('Accept-Ranges: bytes');
@readfile($file);
?>
Code:
$filename = 'yolo.pdf';
For example if i have this record on a table (which displays all the records in a db):
id=1;
name=marley.pdf ;
type:pdf;
size:xxx mb;
If i click on the name of the file i want a variable that will get that name and put it into the code.
the code would be something like this:
Code:
$filename = '$pdfname';
Peace,
Slaxer13
Comment