First of all, please help!
Ok so im trying to create a table of 4 columns and 3 rows with each cell holding a random hyperlinked picture.
Below is my code.
<?php
include ("connection.php");
$query = "SELECT * FROM games ORDER BY Rand() LIMIT 3";
$result = mysql_query($query);
print "<table border=1>";
while($row = mysql_fetch_array($result)) {
print "<tr>";
print "<td><a href=pregame.php?id=".$row['GameId']."><img src=images/".$row['Thumb']." alt=Image width=100 height=76 class=gamepic/></a></td>";
print "<td><a href=pregame.php?id=".$row['GameId']."><img src=images/".$row['Thumb']." alt=Image width=100 height=76 class=gamepic/></a></td>";
print "<td><a href=pregame.php?id=".$row['GameId']."><img src=images/".$row['Thumb']." alt=Image width=100 height=76 class=gamepic/></a></td>";
print "<td><a href=pregame.php?id=".$row['GameId']."><img src=images/".$row['Thumb']." alt=Image width=100 height=76 class=gamepic/></a></td>";
print "</tr>";
}
print "</table>";
?>
The problem is that its printing the same hyperlinked picture in each 4 cells of a row.