I need to show a PDF file that i have in a mysql BLOB field.
How can i do this?
I have a php code that works in a php, but if i put in the blank form doesn?t work
<?php
########## imagen_mostrar.php ##########
deve recibir el id de la imagen a mostrar
http://www.lawebdelprogramador.com
Conectamos con la base de datos
$link=mysql_connect(“localhost”,“my”,“my”);
mysql_select_db(“Docs”,$link);
Buscamos la imagen a mostrar
$result=mysql_query(“SELECT Doc FROM Docs WHERE Cod=”.$_GET[“id”],$link);
$row=mysql_fetch_array($result);
Mostramos la imagen
header(‘Content-type: application/pdf’);
header(‘Content-Disposition: attachment; filename=“downloaded.pdf”’);
echo $row[“Doc”];
?>