为什么按完submit按钮,$submit变量不存在呢?
lynew 2005-10-13 03:33:53 <html>
<body>
<?php
if ($submit) {
while (list($name, $value) = each($HTTP_POST_VARS)) {
echo "$name = $value<br>\n";
}
} else{
?>
<form method="post" action="<?php echo $PATH_INFO?>">
名:<input type="Text" name="first"><br>
姓:<input type="Text" name="last"><br>
住址:<input type="Text" name="address"><br>
职位:<input type="Text" name="position"><br>
<input type="Submit" name="submit" value="输入信息">
</form>
<?php
}
?>
</body>
</html>
为什么按完按钮之后没有执行if 的内容呢?