<?php
include 'dbinc.php';
$result = mysql_query("SE LECT image,mime_type FROM photos WHERE
image_id=".intv al($_GET['id']), $link) or die("MyErr:".my sql_error());
if ($row = mysql_fetch_ass oc($result)) {
$ext=array('ima ge/jpeg'=>'jpg','i mage/gif'=>'gif','im age/png'=>'png','im age/x-png'=>'png');
header("Expires : Mon, 26 Jul 2030 05:00:00 GMT");
header("Content-Type: $row[mime_type]");
header("Content-Disposition: inline;
$_GET[id].".$ext[$row['mime_type']]);
echo "\r\n".stripsla shes($row['image']);
}
mysql_free_resu lt($result);
?>
what am I doing wrong? I don't get an image. I've seen thumbnail stuff. I
don't want a thumbnail (that code didn't work either for some reason).
include 'dbinc.php';
$result = mysql_query("SE LECT image,mime_type FROM photos WHERE
image_id=".intv al($_GET['id']), $link) or die("MyErr:".my sql_error());
if ($row = mysql_fetch_ass oc($result)) {
$ext=array('ima ge/jpeg'=>'jpg','i mage/gif'=>'gif','im age/png'=>'png','im age/x-png'=>'png');
header("Expires : Mon, 26 Jul 2030 05:00:00 GMT");
header("Content-Type: $row[mime_type]");
header("Content-Disposition: inline;
$_GET[id].".$ext[$row['mime_type']]);
echo "\r\n".stripsla shes($row['image']);
}
mysql_free_resu lt($result);
?>
what am I doing wrong? I don't get an image. I've seen thumbnail stuff. I
don't want a thumbnail (that code didn't work either for some reason).
Comment