pdf_download.php
........................................................................
<?php
$file_name=$row;
header("Content-type: application/pdf");
header("Content-Disposition: attachment; filename=\"$file_name\"");
$data=readfile("../new_books/".$file_name);
echo $data;
?>
home.php
...............................................................................
<td align="center" valign="middle" bgcolor="#FFFFFF"><img src="images/rar.gif"><a href="pdf_download.php?name=<?php echo $row ?>"><img src="images/button_buy.jpg"></a></td>
<td align="center" valign="middle" bgcolor="#FFFFFF"><img src="images/rar.gif"><a href="uploads/<?php echo $row ?>"><img src="images/untitled.bmp" width="43" height="17"></a></td>
</tr>
hi,
I need a help from anybody.
I have a page with pdf downloading links.
I need to dwn load each pdf file from its corresponding links.
The values are passed to that link from db dynamically.I have a code for dwnloading pdf but its not working properly.
Please help me...................