这个程序为什么错在哪里
<?php
 include("conn.php"); if($_POST['submit']){
   echo $sql="insert into message(id,user,title,content,lastdate)".
   "values('','$_POST[user]','$_POST[title]','$_POST[content]',now())";
 }?>
    <from action="add.php" method="post" >
    用户:<input type="text" size="10" name="user" /><br>
    标题:<input type="text"  name="title" /><br/>
    内容:<textarea name="content" ></textarea><br/>  <input type="submit" name="submit" value="发布留言"/>    </from>

解决方案 »

  1.   

    values('','$_POST[user]','$_POST[title]','$_POST[content]',now())"; 改为:
    values('','$_POST['user']','$_POST['title']','$_POST['content']',now())"; 
      

  2.   

    改为: 
    values('','$_POST["user"]','$_POST["title"]','$_POST["content"]',now())"; 
    另外if($_POST['submit'])括号里应该是一个判断语句。
      

  3.   

    if($_POST['submit'])本来就是一个判断语句
    你说的不行 
      

  4.   


     <from action="add.php" method="post" > 
        用户: <input type="text" size="10" name="user" /> <br> 
        标题: <input type="text"  name="title" /> <br/> 
        内容: <textarea name="content" > </textarea> <br/>   <input type="submit" name="submit" value="发布留言"/>     </from>应该是form吧
      

  5.   

     <from action="add.php" method="post" > 
        用户: <input type="text" size="10" name="user" /> <br> 
        标题: <input type="text"  name="title" /> <br/> 
        内容: <textarea name="content" > </textarea> <br/>   <input type="submit" name="submit" value="发布留言"/>     </from>
    应该是<form>和</form>