<form action="#?action=do" method="post">
1<input type="checkbox" name="xxx[]" value="1"><br/>
2<input type="checkbox" name="xxx[]" value="2"><br/>
3<input type="checkbox" name="xxx[]" value="3"><br/>
4<input type="checkbox" name="xxx[]" value="4"><br/>
<input type="submit">
</form>
<?
$id = $_POST['xxx'];
if(!empty($id)){
foreach ($id as $aaa)
{
echo $aaa."<br />";
}
}
?>显示数组xxxx,没有定义,怎么解决.
for($n = 0; $n < 10; $n++)
<input type="checkbox" name="c[]" value="1">1
可以这样输出一组复选框
1<input type="checkbox" name="xxx[]" value="1"><br/>
2<input type="checkbox" name="xxx[]" value="2"><br/>
3<input type="checkbox" name="xxx[]" value="3"><br/>
4<input type="checkbox" name="xxx[]" value="4"><br/>
<input type="submit">
</form>
<?
$id = $_POST['xxx'];
if(!empty($id)){
foreach ($id as $aaa)
{
echo $aaa."<br />";
}
}
?>显示数组xxxx,没有定义,怎么解决.
for($n = 0; $n < 10; $n++)
<input type="checkbox" name="c[]" value="1">1
可以这样输出一组复选框
foreach ($id as $aaa)
{
echo $aaa."<br />";
}
}