Saturday, 24 August 2013

Display image in php

Display image in php

how to display image in html by retrieving it from mysql database.
i have the following code but only text is being displayed in place of
image. How to display the image instead of the text of image.
Code:
while ($row = mysql_fetch_assoc($result))
{
//echo "<div>";
//echo "<div class=\"slide-image\">";
print $row['Image'];
//echo "</div>";
echo "<div class=\"slide-text\">";
echo $row['Head'];
echo $row['Description'];
//echo "</div>";
//echo "</div>";
}
It displays the resulting JPEG as text, which as you might imagine is very
difficult to interpret.

No comments:

Post a Comment