php留言板代码容易出错,制作PHP+MYSQL留言板代码出错。
是什么原因啊?
include("conn.php");
if($_POST['sumbit'])(
echo $sql="insert into message (id,user,title,content,lastdate) " .
"values('','$_POST[user]','$_POST[title]','$_POST[content]',now())";
)
用户:
标题:
内容:
在浏览器情况下
( ! ) Parse error: syntax error, unexpected 'echo' (T_ECHO) in C:\demo\test01\de\add.php on line 6
回复内容:
是什么原因啊?
include("conn.php");
if($_POST['sumbit'])(
echo $sql="insert into message (id,user,title,content,lastdate) " .
"values('','$_POST[user]','$_POST[title]','$_POST[content]',now())";
)
用户:
标题:
内容:
在浏览器情况下
( ! ) Parse error: syntax error, unexpected 'echo' (T_ECHO) in C:\demo\test01\de\add.php on line 6
额,if的代码段难道不是用大括号吗?你用小括号干嘛?
include("conn.php");
if($_POST['sumbit'])(
$sql="insert into message (id,user,title,content,lastdate) " .
"values('','$_POST[user]','$_POST[title]','$_POST[content]',now())";
echo $sql;
)
相关标签:php
本文原创发布php中文网,转载请注明出处,感谢您的尊重!
总结
以上是生活随笔为你收集整理的php留言板代码容易出错,制作PHP+MYSQL留言板代码出错。的全部内容,希望文章能够帮你解决所遇到的问题。
- 上一篇: mysql导出数据库报错,navicat
- 下一篇: oracle sql字符拆分字符串函数,