Good Day
I store my images as a blob. I dont have a problem out putting it to the browser, that works just fine. But when i display the image and you right click on the image to choose save as then i gives the php file as file name and the extension php. I want to specify a name, it can be the same name for all the images and jpg as the file extension. Below is the code i use to output the image to a request.
<?php
$id = getRequestVariable("id");
$query = "select * from photos where id='$id'";
$result = mysql_query($query);
while ($row = mysql_fetch_array($result))
{
header("Content-type: image/jpg");
echo $row[8];
}
?>
This is how i request the image
<img src='viewLargePhoto.php?id=<? print "$id"; ?>' border='1'>
Thanks in advance