Hello programmers... I have save the pathname of the uploaded photos in the database. The pathname is on the database but I dont know how to retrieved it from the database so that the uploaded photos can be able to see in my website.....
help please!!!!!!!!!!
hi Cheryl..,
uhmmn i think your not actually retrieving images from the database just the path of the image right? Well if you have the exact path of these images uploaded.., you can use the <img> tag to make these images visible on our page. For example:
let say you have the table tbl_images containing the column for imgpath. all you have to do is to create a simple query like this.
[PHP]
$getImagePath = "SELECT * FROM tbl_images";
$path = mysql_query($getImagePath) or die(mysql_error());
while($imgpath = mysql_fetch_array($path)){
echo "<img border='0' src='".$imgpath['imgpath']."' width='150'
height='150' />"."<br />";
}
[/PHP]
i hope my simple example would help you.
--nert (^_^)