Ok, I've done the following:
Code: Select all
<?php
$date = date ("j m Y h:i:s A");
// snipped out some text in between
$sql = mysql_query("INSERT INTO table1 (heading, current_date, body_text, message_id)
VALUES('$heading', '$date', '$body_text', '$message_id')") or die (mysql_error());
?>
And it brings me with an error:
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'current_date, body_text, message_id) VALUES('This is a message heading', '4 11 20
What is going wrong? Logically, that should work.