include("conn.php");
if( isset($_POST["submit"]))
{
$sql="INSERT INTO message (id,user,title,content,lastdate) " .
"values ('','$_POST [user]','$_POST[title]','$_POST[content]',now())";
//echo $sql;
$result = mysql_query($sql,$conn)または die(mysql_error());
}
?>
------解决方案---------
if (document.myform.user.value=="")