I am having trouble displaying a image from a mysql database. I am storing the image using BLOB. I am not sure what I am doing wrong?
$result = mysql_query("SELECT * FROM ae_gallery
WHERE ext='$ext'");
while($row = mysql_fetch_array($result))
{
header("Content-type: image/jpeg");
//echo $row['title'] . " " . $row['data'];
print "Image : ".$row['data'];
print '<img src="='.$row['data'].'"/>';
// echo header("Content-type: image/jpg".$row['data']);
//echo "<br />";
}
}
else
{
preg_match($vidtype,$header)!=false;
$result = mysql_query("SELECT * FROM ae_gallery
WHERE ext=''");
while($row = mysql_fetch_array($result))
{
echo $row['video_id'] . " " . $row['video'];
echo "<br />";
echo 'NO Match';
}
}
}