The easiest way of doing this is probably the latter method that bogu describes, by making the drop down dynamic (also good if you think you'll be adding more categories later)
Get the data from the db (including the category id and category description which is what you'll pass to view.php)
page.php (including dropdown)
//connect to db & perform query to extract the different types of category
//if it returns results, start the drop down
$cat_id = $result['name_of_row_containing_cat_type']
$cat_desc = $result['name_of_row_containing_cat_description']
echo '<form name="cat_id" action="view.php">';
echo '<select name=category_list>';
//for each result, create an <option> tag
while (results from query)
{
echo '<option value="'.$cat_id.'">'.$cat_desc.'</option>';
}
//end the dropdown and the form
echo '</select></form>';
OK, you've now prepared the links and the variables, now you have to pass them to view.php
//see if the variable has been passed
if (!isset($_GET['cat_id']) || $_GET['cat_id']=='')
{
echo 'no cat_id found'
}
//if it has been found, run the SQL query using the cat_id it found
else
{
$cat_id=$_GET['cat_id']
$result=mysql_query("SELECT * FROM my_db WHERE field_containing_cat_id = '$cat_id' ORDER BY my_choice") or die ("error in query".mysql_error);
//then you can print the results on that page as you see fit
echo 'my resultset here';
}
Hope that helps