这段超级简单的获取表单的代码哪里错了
<?phpif($_POST['submit']) {
$name=$_POST['name'];
echo $name;
}
?>
<form action="login.php" method="post" enctype="text/plain">
昵称:<input type="text" name="name" /><br>
密码:<input type="text" name="pass" /><br>
<input type="submit" name="submit" value="登陆"/>
</form>
[color=#ff0000]怎么接收不到NAME呢[/color]
[[i] 本帖最后由 theend12 于 2010-9-2 15:48 编辑 [/i]]
不清楚为什么eclipse工具中自动完成的功能,添加FORM时里面多个这个。
[em29] _ [em02] <?php
if($_POST['submit'])
{
$name=$_POST['name'];
echo $name;
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<body>
<form action="#" method="post" enctype="">
昵称:<input type="text" name="name" /><br>
密码:<input type="text" name="pass" /><br>
<input type="submit" name="submit" value="登陆"/>
</form>
</body>
</html>
页:
[1]