Hello every body,
I made an image gallery, but the photos displaying repeatedly in each row, I want the seven pictures displaying in each row of the table, then starts from the other row and same for others, the attachment pictures show the problems, what should I do?
<?php
$select = mysql_query("SELECT * FROM gallery ORDER BY id DESC") or die(mysql_error());
echo "<table align=center>";
while($r = mysql_fetch_array($select)){
// extract($r);
$pic = $r['image'];
$pic = "UploadedImage/".$pic;
$id = $r['id'];
?>
<tr>
<td align="center"><b><?php print($r['title']); ?></b></td>
<td align="center"><b><?php print($r['title']); ?></b></td>
<td align="center"><b><?php print($r['title']); ?></b></td>
<td align="center"><b><?php print($r['title']); ?></b></td>
<td align="center"><b><?php print($r['title']); ?></b></td>
<td align="center"><b><?php print($r['title']); ?></b></td>
<td align="center"><b><?php print($r['title']); ?></b></td>
</tr>
<tr>
<td align="center"><?php print($r['description']); ?></td>
<td align="center"><?php print($r['description']); ?></td>
<td align="center"><?php print($r['description']); ?></td>
<td align="center"><?php print($r['description']); ?></td>
<td align="center"><?php print($r['description']); ?></td>
<td align="center"><?php print($r['description']); ?></td>
<td align="center"><?php print($r['description']); ?></td>
</tr>
<tr>
<td align="center"><?php print("<img width=150 height=150 src='$pic'>"); ?></td>
<td align="center"><?php print("<img width=150 height=150 src='$pic'>"); ?></td>
<td align="center"><?php print("<img width=150 height=150 src='$pic'>"); ?></td>
<td align="center"><?php print("<img width=150 height=150 src='$pic'>"); ?></td>
<td align="center"><?php print("<img width=150 height=150 src='$pic'>"); ?></td>
<td align="center"><?php print("<img width=150 height=150 src='$pic'>"); ?></td>
<td align="center"><?php print("<img width=150 height=150 src='$pic'>"); ?></td>
</tr>
<tr>
<td align="center"><?php print("<a href=\"admin.php?action=edit&id=$id\">Edit</a>"); ?></td>
<td align="center"><?php print("<a href=\"admin.php?action=edit&id=$id\">Edit</a>"); ?></td>
<td align="center"><?php print("<a href=\"admin.php?action=edit&id=$id\">Edit</a>"); ?></td>
<td align="center"><?php print("<a href=\"admin.php?action=edit&id=$id\">Edit</a>"); ?></td>
<td align="center"><?php print("<a href=\"admin.php?action=edit&id=$id\">Edit</a>"); ?></td>
<td align="center"><?php print("<a href=\"admin.php?action=edit&id=$id\">Edit</a>"); ?></td>
<td align="center"><?php print("<a href=\"admin.php?action=edit&id=$id\">Edit</a>"); ?></td>
</tr>
<tr>
<td align="center"><?php print("<a href=\"admin.php?action=delete&id=$id\">Delete</a>"); ?></td>
<td align="center"><?php print("<a href=\"admin.php?action=delete&id=$id\">Delete</a>"); ?></td>
<td align="center"><?php print("<a href=\"admin.php?action=delete&id=$id\">Delete</a>"); ?></td>
<td align="center"><?php print("<a href=\"admin.php?action=delete&id=$id\">Delete</a>"); ?></td>
<td align="center"><?php print("<a href=\"admin.php?action=delete&id=$id\">Delete</a>"); ?></td>
<td align="center"><?php print("<a href=\"admin.php?action=delete&id=$id\">Delete</a>"); ?></td>
<td align="center"><?php print("<a href=\"admin.php?action=delete&id=$id\">Delete</a>"); ?></td>
</tr>
<tr>
<td align="center"><?php print("<a href=\"full.php?id=$id\">Full Image</a>"); ?></td>
<td align="center"><?php print("<a href=\"full.php?id=$id\">Full Image</a>"); ?></td>
<td align="center"><?php print("<a href=\"full.php?id=$id\">Full Image</a>"); ?></td>
<td align="center"><?php print("<a href=\"full.php?id=$id\">Full Image</a>"); ?></td>
<td align="center"><?php print("<a href=\"full.php?id=$id\">Full Image</a>"); ?></td>
<td align="center"><?php print("<a href=\"full.php?id=$id\">Full Image</a>"); ?></td>
<td align="center"><?php print("<a href=\"full.php?id=$id\">Full Image</a>"); ?></td>
</tr>
<?php
}
echo "</table>";
?>