Source code of dbSelect2.php
<html>
<head>
<title>Select Across Tables</title>
</head>
<body>
<h2>Inventory</h2>
<table width='75%'>
<tr>
<th>Item Description</th>
<th>Color</th>
<th>Size</th>
<th>Quantity</th>
</tr>
<?php
$cat_id = $_REQUEST['cat_id'];
$lines = file("mysql.txt");
$password = trim($lines[0]);
$dbLink = mysql_connect("localhost", "tboegel", $password);
mysql_select_db("clearwater", $dbLink);
$query = "SELECT item_desc, color, inv_size, inv_qoh "
. "FROM inventory, item "
. "WHERE inventory.item_id = item.item_id "
. "AND item.cat_id = $cat_id "
. "ORDER BY item_desc, color, inv_size";
$recordset = mysql_query($query, $dbLink);
while ($row = mysql_fetch_assoc($recordset)) {
print "<tr>";
print "<td>{$row['item_desc']}</td>";
print "<td>{$row['color']}</td>";
print "<td>{$row['inv_size']}</td>";
print "<td>{$row['inv_qoh']}</td>";
print "</tr>\n";
}
mysql_free_result($recordset);
mysql_close($dbLink);
?>
</table>
</body>
</html>