Please i want to do the same as the selected answer in pdf
How to retrieve images from MySQL database and display in an html tag
I want to retreive pdf in MySQL database and display it browser here is my code :
<?php
$id = $_GET['id'];
// do some validation here to ensure id is safe
$link = mysql_connect("localhost", "root", "");
mysql_select_db("workshopinternational");
$sql = "SELECT fichier FROM inscrits WHERE id=$id";
$result = mysql_query($sql);
$row = mysql_fetch_assoc($result);
mysql_close($link);
header("Content-type: image/jpg");
//header('Content-type: application/pdf');
//readfile('original.pdf');
echo $row['fichier'];
?>