Hi!everyone
It may be very silly,I think,but it puzzled me all the night!I gotta ask
some expert.I load an image into my database(MySQL) successfully,now I want to display it from database to the browser.I write the program as follows:
<?//display.php
//connect to the mysql server
include("try/MySQL-connect.php");
// displaying an images from the database
$query="select img from images where name='$name'"; //img is image's binary code
$result = mysql_db_query($DB,$query);
$Rows=mysql_num_rows($result);
if ($Rows<1){ echo "Sorry,no image";
}
else {
$getimage = mysql_fetch_object($result);
$Img=$getimage->img;
echo $Img;
flush();
}
?>
In another file:
<img src="display.php">
But it can't run well.I can't display the images on the browser!
I need your help !
Thanks in advance.
poor Eric