Forum Moderators: coopster
ɮ NP^jV}U^%nye>9oJ@'t8ͩuY'OGה*Ԫm tU0AӻZ]_; O @,w? ǽ;5lew}R/cם Ou$XVv)uH_+ȊL0k
what should i do?
the structure of the image is like this:
id= int
image= blob
your_name= varchar(255)
email= varchar(255)
description= varchar(255)
time= timestamp(14)
the php code to display all the above info is:
<?php
$conn= mysql_connect("localhost","*****","*****") or die ("Error: conn");
$rs= mysql_select_db("test", $conn) or die ("error: db");
$sql= "select * from tbl_images";
$rs= mysql_query($sql, $conn);
while( $row = mysql_fetch_array($rs))
{
echo("PHOTO POSTED AT-". $row["time"]."<br>");
echo("PHOTO TAKEN BY-". $row["taken_by"]."<br>");
echo("EMAIL-". $row["email"]."<br>" );
echo("DESCRIPTION-". $row["description"]."<br>");
echo ("<hr>". $row["image"] ."<br><hr><hr><hr>");
}
?>
the correct way to display an image using the http protocol is either as an image tag in an html document or as a media file with the proper content type header.
in the html case, the image tag must refer to a url which serves a media file with the proper content type header.
the way you have it now you are trying to print the blob as text in an html document.