Hi all,...
i've created hyperlink from database to pdf file, my goals when i click the hyperlink then display the pdf file, but the problem is there is a transition page with broken image on the upper left corner and if i place the cursor around the icon the cursor change to hand icon and when i click again the pdf file appears.
so how to make the hyperlink from db direct to pdf file without a transition page/blank page ???
these is my script, previously i use this script for displaying image file (.png)
<?php
$q=$_GET['id'];
$con = mysql_connect('localhost', 'test', '123');
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("dm", $con);
//end of your conn.
$query = mysql_query("SELECT file FROM 2012 WHERE id = '$q' LIMIT 1") or die(mysql_error());
while($imglink = mysql_fetch_assoc($query))
{
echo '<a href="'.$imglink['file'].'"><img src="'.$imglink['file'].'" width="430" height="608" alt="" /></a>';
}
?>
if i use this script in hyperlink will appear :
http://localhost/dociee-d-l.php?id=L07-09-12
and my hope the hyperlink will be direct to pdf file :
http://localhost/dociee-d-l.php?id=L07-09-12.pdf
thank you