This doesn't necessarily fix your problem, but I find it difficult to debug your SQL statement when it contains concatenation and PHP code as well as SQL......
mysql_query('INSERT INTO posts SET title="'.addslashes($_POST['title']).'", message="'.addslashes($_POST['message']).'", date="'.addslashes($_POST['date']));
So, what I tend to do is build-up my SQL statement in a variable first.....
$sql = "INSERT INTO posts SET ";
$sql .= "title = " . addslashes($_POST['title']) . ";
// etc. etc.
mysql_query($sql);
That way, if it doesn't work you can echo out the SQL on its own and run it in phpMyadmin or equivalent to find more accurate error information.......
$sql = "INSERT INTO posts SET ";
$sql .= "title = " . addslashes($_POST['title']) . ";
// etc. etc.
echo $sql;
mysql_query($sql);
If you're still having trouble with the error then let us know what the error message reads. It may be that your syntax is wrong, it may be that you have a typo in your field names or table names.