|
Posted by Jim Michaels on 04/16/06 00:03
<?php
include 'dbinc.php';
$result = mysql_query("SELECT image,mime_type FROM photos WHERE
image_id=".intval($_GET['id']), $link) or die("MyErr:".mysql_error());
if ($row = mysql_fetch_assoc($result)) {
$ext=array('image/jpeg'=>'jpg','image/gif'=>'gif','image/png'=>'png','image/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".stripslashes($row['image']);
}
mysql_free_result($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).
Navigation:
[Reply to this message]
|