There is probably a simple solution to this but as a newbie to php/mysql i'm having difficulties with this..
I have a database containing 3 fields for images (ID, name, path). I am wanting to use the data in an image gallery. Thinking it would be fairly easy to do I created a table in dreamweaver 6 columns by 1 row and inserted a repeating region in the 1st column. The end result was the images loaded next to each other making one huge row. I tried moving things about a little but all i can get is either a long columb or row, I cant get the images to load up one after the other in a 6 by n format.
Heres the code I am using:
<?php
mysql_select_db($database_filmuk_db, $filmuk_db);
$query_thumb_view = "SELECT * FROM image ORDER BY ID ASC";
$thumb_view = mysql_query($query_thumb_view, $filmuk_db) or die(mysql_error());
$row_thumb_view = mysql_fetch_assoc($thumb_view);
$totalRows_thumb_view = mysql_num_rows($thumb_view);
?>
<table width="600" border="1" cellpadding="0" cellspacing="0">
<?php do { ?><tr>
<td width="100" height="100"><img src="/admin/<?php echo $row_thumb_view['path']; ?>" width="100" height="100" border="0"></img></td>
<td width="100" height="100> </td>
<td width="100" height="100"> </td>
<td width="100"height="100"> </td>
<td width="100" height="100> </td>
<td width="100"height="100"> </td>
</tr><?php } while ($row_thumb_view = mysql_fetch_assoc($thumb_view)); ?>
</table>
I've put blank spaces in 5 of the 6 columns to make the code as mess free as possible. Im wanting to be able to call the images from the database and fil the 6 columns and extra rows with a different image from the database. How can I do this?
Thanks in advance๐