高手帮我看下这个。

高手帮我看下这个。

<?php
$host="localhost";
$username="root";
$password="123456";
$datebase="msg";
$conn=mysql_connect($host,$username,$password);
mysql_select_db($datebase,$conn);
mysql_query("SET NAMES 'GBK'");
$content=$_POST['content'];
$sql="insert into new_message
(content,time)
values
('$content',now())";
$rs=mysql_query($sql);
if ($rs){
echo "<script language=javascript>alert('留言成功了!');</script>";
}
else{
"<script language=javascript>alert{'留言失败!'};</script>";
}
?>
<script language="javascript">
function Checkpost(){
if(myform.content.value.length<5){
  alert('留言内容不可以小于5个');
return false;
}
}
</script>
<form method="POST" name="myform" action="message.php">
<textarea name="content" id="content" cols="30" rows="6"></textarea><br>
      <input type="submit" name="submit" value="发表留言">
</form>
在调试的时候为什么$content里的内容不能提交到数据库里去?说$content是没有定义的变量?

数据库里只会一条信息,如果再想加进去就加不进去?这是什么?

这样试试:
$sql="insert into new_message (content,time) values ("'".$content."'",now())";