[英]Filter results based on check boxes.
我想根據點擊的復選框來過濾結果,因為我按下了這些復選框。
URL位置Bhk = 1 Bhk,2Bhk .. search-result.php?ResidentalType = Sell&ResidentialProperties = Apartment&Bhk =&budget_from =&budget_to =&City = Ahmedabad + West&ResidentalPropertySubmit = GO的自動廣告復選框值
使用表格提交
<form id="someformId" action="submitform.php" method="POST">
<input type="checkbox" name="bhk" value="1 BHK">1 BHK<br>
<input type="checkbox" name="bhk" value="2 BHK">2 BHK<br>
.....
.....
.....
</form>
並且在submitform.php中,您可以調用$_POST['bhk']
返回值
嘗試這個:
<form id="frm1" name="frm1" action="submitform.php" method="POST">
<input type="checkbox" name="bhk[]" value="1 BHK">1 BHK
<input type="checkbox" name="bhk[]" value="2 BHK">2 BHK
<input type="checkbox" name="bhk[]" value="3 BHK">3 BHK
<input type="checkbox" name="bhk[]" value="4 BHK">4 BHK
<input type="checkbox" name="bhk[]" value="5 BHK">5 BHK
</form>
$_POST['bhk']
變量獲取數據。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.