Only Single image is display .guide how i display multiple image in our page in php
i am sending coding . there are two file1.php and file2.php .guide me
file1.php
<?php
header("content-type:image/jpeg");
$con=mysql_connect('localhost','root','');
if(!$con)
{
die("colud not open");
}
$d=mysql_select_db("test1");
if(!$d)
{
die("colud not open");
}
$q1=mysql_query("select * from img1");
while($r=mysql_fetch_array($q1))
{
//$id=$r['id'];
//$filename=$r['filename'];
//$filetype=$r['filetype'];
//$filesize=$r['filesize'];
//$m=$r['masterimage'];
$mm=$r['thumbnail'];
//header("Content-type: image/jpeg");
echo $mm;
}
?>
file2.php
<?php
$con=mysql_connect('localhost','root','');
error_reporting(E_ALL);
if(!$con)
{
die("colud not open");
}
$d=mysql_select_db("test1");
if(!$d)
{
die("colud not open");
}
//id=$_GET['id'];
$q1=mysql_query("select * from img1");
echo "<table>";
echo "<tr>
<td>id</td>
<td>filename</td>
<td>filetype</td>
<td>filesize</td>
<td>master</td>
</tr>";
while($r=mysql_fetch_array($q1))
{
$id=$r['id'];
$filename=$r['filename'];
$filetype=$r['filetype'];
$filesize=$r['filesize'];
//$m=$r['masterimage'];
$mm=$r['thumbnail'];
echo "<tr>
<td>$id</td>
<td>$filename</td>
<td>$filetype</td>
<td>$filesize</td>";
echo '<img src="img3.php" >
</tr>';
}
?>
</table>