I have a code that fetches images from database and displays them. However, it only displays the first image. I need to modify it to display multiple images.
Here is the code snippet:
if(isset($_GET['submit-id']))
{
if(isset($_GET['image-name']))
{
$query="SELECT `image` FROM `temp_image` where `name` like '%Chi%'";
if($run_query=mysql_query($query))
{
if(mysql_num_rows($run_query)>0)
{
while($row=mysql_fetch_assoc($run_query))
{
header("Content-type: image/jpeg");
$image=$row['image'];
echo $image;
}
}
else
echo "Incorrect id";
}
}
}