Why? Include (& quot; conn. php & quot;); if ($ _ POST [& #039; sumbit & #039;]) (echo $ SQL & quot; insertintomessage (id, user, title, content, lastdate) & quot ;. & quot; values (& #039; & #039;, & #039; $ _ POST [user] & #039;, & #039; $ _ POST [title] & #039;, & #039; $ _ POST [content] & #0 Why?
Include ("conn. php ");
If ($ _ POST ['sumbit ']) (
Echo $ SQL = "insert into message (id, user, title, content, lastdate )".
"Values ('', '$ _ POST [user]', '$ _ POST [title]', '$ _ POST [content]', now ())";
)
User:
Title:
Content:
In the case of a browser
(! ) Parse error: syntax error, unexpected 'echo '(T_ECHO) in C: \ demo \ test01 \ de \ add. php on line 6
Reply content:
Why?
Include ("conn. php ");
If ($ _ POST ['sumbit ']) (
Echo $ SQL = "insert into message (id, user, title, content, lastdate )".
"Values ('', '$ _ POST [user]', '$ _ POST [title]', '$ _ POST [content]', now ())";
)
User:
Title:
Content:
In the case of a browser
(! ) Parse error: syntax error, unexpected 'echo '(T_ECHO) in C: \ demo \ test01 \ de \ add. php on line 6
Well, isn't the if code segment enclosed by braces? Why are you using parentheses?
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;)