hello i wanted to display the nultiple image in the webpage from mysql database. I am new to php. till now it only displays one image at a time. Please help .
Here is the code snippet:
<?php
$db = mysqli_connect ('localhost', 'username', 'pwd', 'databasename');
$query = "select * from picture";
$result = mysqli_query($db, $query);
$row_cnt = mysqli_num_rows($result);
for($i=0; $i<$row_cnt; $i++)
{
$row = mysqli_fetch_assoc($result);
header ('Content-Type: '.$row['type']);
echo $row['pic'];
}
mysqli_free_result($result);
?>