是什么原因啊?
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的代码段难道不是用大括号吗?你用小括号干嘛?
<code>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; ) </code>