( ! ) Notice: Undefined index: submit in D:\wamp\www\add.php on line
(!)Notice:Undefinedindex:submitinD:\wamp\www\add.phponline9if($_POST['submit']){$sql=...
( ! ) Notice: Undefined index: submit in D:\wamp\www\add.php on line 9
if($_POST['submit'])
{$sql="insert into message (`id`,`user`,`title`,`content`,`lastdate`)values('','$_POST[user]','$_POST[title]','
$_POST[content]','now()')";
mysql_query($sql);
echo"发表成功";}else{echo"发表失败";}
?>
<form action="add.php" method="POST" >
用户:<input type="text" size=10 name="user"/><br>
标题:<input type="text" size=20 name="tltle"/><br>
内容:<textarea name="content"></textarea><br>
<input type="submit" name="submit"value="发布留言"/>
</form>
发表失败,求各位大神指教 展开
if($_POST['submit'])
{$sql="insert into message (`id`,`user`,`title`,`content`,`lastdate`)values('','$_POST[user]','$_POST[title]','
$_POST[content]','now()')";
mysql_query($sql);
echo"发表成功";}else{echo"发表失败";}
?>
<form action="add.php" method="POST" >
用户:<input type="text" size=10 name="user"/><br>
标题:<input type="text" size=20 name="tltle"/><br>
内容:<textarea name="content"></textarea><br>
<input type="submit" name="submit"value="发布留言"/>
</form>
发表失败,求各位大神指教 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询