我有一个示例代码:
$category_id = $_POST['category_id'];
<form action="search.php&category_id=$category_id" method="post">
<p class="categories">
<select name="category_id">
<option value="1">Category 1</option>
<option value="2">Category 2</option>
</select>
</p>
<p class="submit">
<input class="button" type="submit" value="Tìm game" />
</p>
</form>
当我提交表单是 URL 是search.php&category_id=0
如何解决这个问题,网址是search.php&category_id=1 // OR 2