sanjay sanjay - 2 years ago 139
MySQL Question

display image whose link is in database

I have links of images in my database e.g.-
above link of an image is in one of the fields of my database. i don't know how to display it in my html page using php. Can any one help?

Answer Source

$sql = "SELECT your_image FROM your_table WHERE your_conditions_here";
$result = mysql_query($sql);
while ($row = mysql_fetch_assoc($result)) {
<img src="<?php echo $row['your_image']; ?>" />
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download