使用mysql php使用下拉选择列表框搜索结果

I have one search box and one dropdown box. The dropdown box displays category entries from the category table. I would like to perform a search on the product table by selecting a category from the categories dropdown and writing a keyword in the search box.

I have attempted the following, but am not seeing the desired results.

Here is the relevant table information:

Categories:

cat id
cat_title

Products:

product_id
product_cat
product_name
product_price
product_keywords

Here are my PHP and MySQL scripts:

<div id="form">
<input type="text" name="user_query" placeholder="Search a Product"/ > 
<select name="product">
<option value="cat">Select a Category</option>

<?php

        mysql_connect('localhost', 'root', '');
        mysql_select_db ("ecomerce");

        $query="SELECT cat_id, cat_title FROM categories";
        $result=mysql_query($query);

        while ($row=mysql_fetch_array($result)) 
        {
        echo "<option value=\"".$row['cat_id']."\">".$row['cat_title']."</option>";

        }
?>

</select>
<input type="submit" name="search" value="Search"/>
</form>