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; } Quote 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. Quote Link to comment https://forums.phpfreaks.com/topic/237704-display-mediumblob-image-help/#findComment-1221532 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.