I am able to retrieve single image from mysql database using php.
Now I want to retrieve multiple images.
Here is the piece of code:
<?php
--db connection code--
$sql = "SELECT image FROM try WHERE status='0'";
$result = mysql_query("$sql") or die("Invalid query: " . mysql_error());
while ($row = @mysql_fetch_assoc($result))
{
// set the header for the image
header("Content-type: image/jpeg");
echo mysql_result($result, 0);
echo '<br>';
}
?>
executing this code, only first image in table is being displayed. How to retrieve multiple images?
header("Content-type: image/jpeg");mysql_result($result, 0);Content-type: image/jpegthe result is also just one file. While multipart responses exist, i currently don't know how well supported they are.