Source code of dbSelect1.php

<html>
<head>
<title>View Inventory</title>
</head>
<body>
<h2>View Inventory</h2>
<form action='dbSelect2.php' method='post'>
<?php

  $lines 
file("mysql.txt");
  
$password trim($lines[0]);
  
$dbLink mysql_connect("localhost""tboegel"$password);

  
mysql_select_db("clearwater"$dbLink);

  
$recordset mysql_query("SELECT * FROM category"$dbLink);

  print 
"<p>Select a category:\n";
  print 
"<select name='cat_id' size=1>\n";
  while(
$row mysql_fetch_assoc($recordset)) {
    print 
"<option value='{$row['cat_id']}'>{$row['cat_desc']}\n";
  }
  print 
"</select></p>";
  print 
"<input type='submit' value='Show inventory'>\n";

  
mysql_free_result($recordset);

  
mysql_close($dbLink);

?>
</form>
</body>
</html>