php错误提示 Notice: Undefined variable: _post in D:\wamp\www\bbs2\add.php on line 5
php新手,总是会出现这种错误,加isset也不行,if语句那里哪儿错了呢???<?phpinclude("conn.php");isset($_post['submit...
php新手,总是会出现这种错误,加isset也不行,if语句那里哪儿错了呢???
<?php
include("conn.php");
isset($_post['submit']);
empty($_post['submit']);
if($_POST['submit']){
echo $sql="insert into message(id,user,title,content,lastdate)
values('$_POST[id]','$_POST[user]','$_POST[title]','$_POST[content]',$now())";
mysql_query($sql);
echo ("登陆成功");
}
?>
<form action="add.php" method="post">
用户:<input type="user" size="10" name="user"/><br>
留言标题:<input type="text" name="name"/><br>
内容:<textarea name="name"></textarea>
<input type="submit" name="submit" value="发布留言">
</form> 展开
<?php
include("conn.php");
isset($_post['submit']);
empty($_post['submit']);
if($_POST['submit']){
echo $sql="insert into message(id,user,title,content,lastdate)
values('$_POST[id]','$_POST[user]','$_POST[title]','$_POST[content]',$now())";
mysql_query($sql);
echo ("登陆成功");
}
?>
<form action="add.php" method="post">
用户:<input type="user" size="10" name="user"/><br>
留言标题:<input type="text" name="name"/><br>
内容:<textarea name="name"></textarea>
<input type="submit" name="submit" value="发布留言">
</form> 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询