"; include("dbstuff.inc"); $cxn = mysqli_connect($host,$user,$passwd,$dbname) or die ("Couldn't connect to server"); $query = "SELECT DISTINCT cat FROM Product ORDER BY cat"; $result = mysqli_query($cxn,$query) or die ("Couldn't execute query."); echo "

Which type of product are you interested in?

Please choose one category from the following list:

\n"; /* create form containing radio buttons */ echo "
\n"; while($row = mysqli_fetch_assoc($result)) { extract($row); echo "$cat\n"; echo "
\n"; } echo "

\n"; ?>