<form action="xierushuju.php" method="post" target="_blank"><table id="table2"><tr><td><b>厂 区:</b></td><td>南区:<input type="radio" name="changqu" value ="南区" /> 北区:<input type="radio" name="changqu" value ="北区" /></td></tr></table > //php代码<?phpvar_dump($_POST);$chan = $_POST['changqu'];echo $chan;?>//报错提示Notice: Undefined index: changqu in C:\wamp\www\baoquan\xierushuju.php on line 4
1 回答
墨色风雨
TA贡献1853条经验 获得超6个赞
html代码:
<form action="xierushuju.php" method="post" target="_blank">
<table id="table2">
<tr>
<td><b>厂 区:</b></td>
<td>
南区:<input type="radio" name="changqu" value ="南区" />
北区:<input type="radio" name="changqu" value ="北区" />
</td>
</tr>
</table>
<button>提交</button>
</form>
php代码:
<?php
header("content-type:text/html;charset=utf-8");
$chan = $_POST['changqu'];
echo $chan;
?>
望采纳!
- 1 回答
- 0 关注
- 910 浏览
添加回答
举报
0/150
提交
取消