<?php
$con=mysql_connect ("xxx","xxx","xxx");
mysql_select_db("dbhappps",$con);
@$sql="select * from tbl_image where id='4' and status='0'";
@$query=mysql_query($sql);
while(@$row=mysql_fetch_array($query))
{
@$image=$row ['photo'];
echo $image
?>
<img src="/image/<?php echo $image; ?>" width="320" height="480">
<?php
}
?>
The echo $image is giving me the correct file name so I am either not referencing the /image (the image folder is in my root directory) folder correctly or could it be a browser issue? I am testing it in google chrome. any tips would be great.
try this
Replace yourwebsite with your website name. or localhost/test etc.
Also check that you are getting .jpg .gif. jpeg extension in the last. other wise use this