<?php
function showContent($title) {
$db = new DB();
$sql = "
SELECT ID, ProductName, ProductDescription, Path2Image, Price
FROM products
";
$result = $db->query($sql);
echo "<h1>$title</h1>\n";
echo "<table width=\"100%\">\n";
showCartLink();
showHeading();
while ($row = mysql_fetch_row($result)) {
list($id, $prodName, $description, $imagePath, $price) = $row;
$price = "$".number_format($price, 2);
showItem($id, $prodName, $description, $imagePath, $price);
}
showCartLink();
echo "</table>\n";
}
?>