MDanz Posted May 28, 2011 Share Posted May 28, 2011 it's not displaying the image... any help? echo "<img src='advertimage.php?id=$advertid' />"; advertimage.php <?php $id= $_GET['id']; $thedatabase = new Database2(); $thedatabase->opendb2(); $advert = $thedatabase->viewadvert($id); header("Content-type: image/jpeg"); echo $advert; $thedatabase->closedb2(); ?> viewadvert function function viewadvert($id){ $getadvert = mysql_query("SELECT * FROM `advertise` WHERE `id`='$id' LIMIT 1",$this->connect); $row=mysql_fetch_assoc($getadvert); $image = $row['image']; return $image; } Link to comment https://forums.phpfreaks.com/topic/237704-display-mediumblob-image-help/ Share on other sites More sharing options...
PFMaBiSmAd Posted May 28, 2011 Share Posted May 28, 2011 Does the URL in the <img src="..." have a $advertid value on it? Assuming that you already have php's error_reporting set to E_ALL and display_errors set to ON, temporarily comment out the header() statement in advertimage.php and browse directly to advertimage.php?id=some_valid_id_here and see what you get as output. Link to comment https://forums.phpfreaks.com/topic/237704-display-mediumblob-image-help/#findComment-1221532 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.