<?php
include('../include/database.php');
mysql_select_db($dbname,$db);
$result = mysql_query("SELECT * FROM reviews WHERE item_id='38'",$db);
$club = mysql_query("SELECT * FROM items WHERE item_id='38'", $db);
$club_name = mysql_fetch_row($club);
// BEGIN HTML AND STUFF
include('../include/rev_header.php');
echo "<p> </p><center>";
echo "<table border=0 width=600 cellpadding=2 cellspacing=0>";
echo "<tr><td valign=top class=big>$club_name[1]</td></tr>";
echo "</table><br><br>";
echo "<b><p class=small><a href=./index.php>Back to Reviews</a></p></b>";
while ($myrow = mysql_fetch_row($result)) {
printf("<center><table border=0 width=600 cellpadding=2 cellspacing=0>");
printf("<tr><td bgcolor=#ccff99 width=100 valign=top><b>Title:</b></td><td bgcolor=#ccff99 valign=top width=500>$myrow[2]</td></tr>");
printf("<tr><td bgcolor=#efefef width=100 valign=top><b>Author:</b></td><td bgcolor=#efefef valign=top width=500>$myrow[3] (<a href=mailto:$myrow[4]>$myrow[4]</a>)</td></tr>");
printf("<tr><td bgcolor=#efefef width=100 valign=top><b>Rating:</b></td><td bgcolor=#efefef valign=top width=500>$myrow[7]</td></tr>");
printf("<tr><td bgcolor=#efefef width=100 valign=top><b>Review:</b></td><td bgcolor=#efefef valign=top width=500>$myrow[6]</td></tr>");
printf("<tr><td><br><br></tr></td>");
printf("</table></center>");
}
include("../include/footer.php");
?>
currenly i have 54 diffrent items i want to get info out of the database for. ive come up with this, which is a template page for the info i want from the database.
insted of making 54 copies of this by changing the...
WHERE item_id='38'"
...part to the next number.
can somebody please help me make this more manageable! thanks!