在php中获取不到表单中的值
<formaction="phphtml.php"method="post"><p>账号:<inputtype="text"name="userid"value="fsa...
<form action="phphtml.php" method="post">
<p>
账号:<input type="text" name="userid" value="fsaf"/ >
</p>
<p>
密码:<input type="password" name="passwd" value="fafa"/ >
</p>
<p>
<input type="submit" name="sub" value="提交"/ >
</p>
</form>
<?php
$userid = $_POST['userid'];
$passwd = $_POST['passwd'];
$sub = $_POST['sub'];
echo '账号:'.$userid;
echo "<br/>";
echo '密码:'.$passwd;
echo "<br/>";
echo $sub;
?> 展开
<p>
账号:<input type="text" name="userid" value="fsaf"/ >
</p>
<p>
密码:<input type="password" name="passwd" value="fafa"/ >
</p>
<p>
<input type="submit" name="sub" value="提交"/ >
</p>
</form>
<?php
$userid = $_POST['userid'];
$passwd = $_POST['passwd'];
$sub = $_POST['sub'];
echo '账号:'.$userid;
echo "<br/>";
echo '密码:'.$passwd;
echo "<br/>";
echo $sub;
?> 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询