[英]only get the value of last checkbox from forum POST
我正在嘗試從表單中獲取POST數據,但問題是它僅顯示提交的最后一個Make項目? 我究竟做錯了什么? 我嘗試了一些務實的方法來使其正常工作,而且一切都沒有運氣!
Refine.php
sort($make);
foreach($make as $key => $value):
if($value != '')
{
echo '
<label>
<input type="checkbox" name="make" value="'.$value.'" id="'.$value.'">
'.ucfirst(strtolower($value)).'</label>
<br>';
}
endforeach;
Browse.php
foreach($_POST['make'] as $item){
echo $item;
}
kotapeter釘牢了!
sort($make);
foreach($make as $key => $value):
if($value != '')
{
echo '
<label>
<input type="checkbox" name="make[]" value="'.$value.'" id="'.$value.'">
'.ucfirst(strtolower($value)).'</label>
<br>';
}
endforeach;
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.