表格設置默認值在PHP中:如何在HTML表單的複選框提交表單前
<tr>
<td>User Registration<input type="hidden" value="1" id="page[]" name="page[]"></td>
<td><input type="checkbox" id="admin[]" name="admin[]" value="1" ~~CHECKED-ADMIN1~~></td>
<td><input type="checkbox" id="staff[]" name="staff[]" value="1" ~~CHECKED-STAFF1~~></td>
<td><input type="checkbox" id="member[]" name="member[]" value="1" ~~CHECKED-MEMBER1~~></td>
</tr>
<tr>
<td>Member Registration<input type="hidden" value="2" id="page[]" name="page[]"></td>
<td><input type="checkbox" id="admin[]" name="admin[]" value="1" ~~CHECKED-ADMIN2~~></td>
<td><input type="checkbox" id="staff[]" name="staff[]" value="1" ~~CHECKED-STAFF2~~></td>
<td><input type="checkbox" id="member[]" name="member[]" value="1" ~~CHECKED-MEMBER2~~></td>
</tr>
PHP代碼:
$page = $_POST['page'];
$admin = $_POST['admin'];
$staff = $_POST['staff'];
$member =$_POST['member'];
現在如何把默認複選框值爲0 beform提交表單php
兩個AN兩者進行修正,但不知道哪一個是適合你的問題 –