php中$_POST得不到值

<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代码
<?php
var_dump($_POST);
$chan = $_POST['changqu'];
echo $chan;
?>
//报错提示
Notice: Undefined index: changqu in C:\wamp\www\baoquan\xierushuju.php on line 4

慕莱坞森
浏览 911回答 1
1回答

墨色风雨

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代码:<?phpheader("content-type:text/html;charset=utf-8");$chan = $_POST['changqu'];echo $chan;?>望采纳!
打开App,查看更多内容
随时随地看视频慕课网APP