对不起,我在问一些非常基本的问题,但我已经卡住了。我有一个包含 3 个字段的搜索表单:一个用于搜索词数据的空白字段、一个下拉框和一个复选框列表。我的页面按搜索词框的预期运行。
但是,我不知道我需要做什么才能将选择值(一个选择选项)和复选框值发送到处理表单。
这是我当前的查询:
SELECT nameid, productypetid, typeid, termsid, endsid, sourceid FROM listings WHERE nameid LIKE %s ORDER BY nameid ASC
这是html表单:
<form action="results2.php" method="get" name="form" class="Ccenter">
<p>Product Name:
<input name="namesearch" type="text" id="namesearch" title="namesearch" />
</p>
<p>
<label for="category">Category:</label>
<select name="category" size="1" id="category">
<option value="Any" selected="selected">Any</option>
<option value="Baby and Kids">Baby and Kids</option>
<option value="Beauty and Hair">Beauty and Hair</option>
<option value="Beverages">Beverages</option>
<option value="Cleaning">Cleaning</option>
<option value="Condiments">Condiments</option>
<option value="Cooking and Baking">Cooking and Baking</option>
<option value="Dairy">Dairy</option>
<option value="Frozen">Frozen</option>
<option value="Meat">Meat</option>
<option value="Medicine">Medicine</option>
<option value="Other">Other</option>
<option value="Pantry Foods">Pantry Foods</option>
<option value="Paper Products">Paper Products</option>
<option value="Pets">Pets</option>
<option value="Restaurants">Restaurants</option>
<option value="Snacks and Candy">Snacks and Candy</option>
<option value="Toiletries">Toiletries</option>
</select>
</p>
<p>
<label>
Type:
<input name="Type" type="checkbox" id="manufacturer" value="manufacturer" checked="checked">
Manufacturer</label>
<label>
<input name="Type" type="checkbox" id="store" value="store" checked="checked">
Store</label>