I'm trying to display image from the database. But nothing is going to display. My code is as below: In the photo database, I have made one table named:photo inside that table there is two field id and photo. Id is auto increment. in photo .image location is saved.
<?php
$con = mysql_connect("localhost","root","");
$db = mysql_select_db("photo",$con);
$sql_image = "select * from photo";
$sql_select = mysql_query($sql_image);
while($data = mysql_fetch_array($sql_select)) {
echo '<img src="/images/'.$data->photo.'"/>';
}
?>