I've been working this, but I can only get it to print three items..?
<?
include("../include.php");
include("../logging.php");
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>__________tees by me</title>
<link href="style.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/JavaScript">
<!--
function del1(givenurl){
var name = confirm("Are you sure you want to delete this record?")
if (name == true){
window.location=givenurl
}
}
-->
</script>
</head>
<body bgcolor="#D9D9C1" leftmargin="15" topmargin="5" marginwidth="15" marginheight="5">
<table width="450" border="1" cellspacing="10" cellpadding="0">
<tr>
<td>
<table width="150" border="1" cellspacing="0" cellpadding="0">
<?
if(!$conn){
die(MYSQL_ERROR());
}
$select_db = MYSQL_SELECT_DB($db);
if(!$db){
die();
}
$query = "SELECT title, username, id FROM catalogue";
$result = MYSQL_QUERY($query, $conn);
if(!$result){
die(MYSQL_ERROR());
}
$count = MYSQL_NUM_ROWS($result);
for($x = 0; $x < $count; $x += 3) {
print "<tr>";
for($y = $x; $y < 3 && $y < $count; $y++) {
$key = MYSQL_FETCH_ARRAY($result);
$id = $key['id'];
$title = $key['title'];
$username = $key['username'];
?>
<td>
<table width="150" border="1" cellspacing="0" cellpadding="0">
<tr>
<td height="150" align="center">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="137" height="100">
<param name="movie" value="../swfmovie.php?item=<?=$id?>">
<param name="quality" value="high">
<embed src="../swfmovie.php?item=<?=$id?>" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="137" height="100"></embed></object>
</td>
</tr>
<tr>
<td align="center">
<p>
<a href="catalogue.php?item=<?=$id?>"><?=$title?></a>
</p>
<p>
<a href="catalogue.php?item=<?=$id?>"><?=$username?></a>
</p>
</td>
</tr>
<tr bgcolor="#E8E8D4">
<td align="center">
<a href="catalogue_edit.php?item=<?=$id?>">Edit record</a>
<a href="javascript:del1('catalogue_delete.php?item=<?=$id?>>')">Delete record</a>
</td>
</tr>
</table>
</td>
<?
}
print "</tr>";
}
?>
</td>
</tr>
</table>
<br><br>
</body>
</html>