I'm trying to have the current date entered automatically in a MySQL table. The field name is announcedate and its set to type timestamp.
In my function for adding an announcement, I have the following code: $announcedate = getdate();
$sql = "INSERT INTO announcements (announcedate, subject, details) VALUES ('$announcedate', '$subject', '$details')";
When adding a record, the date field shows all zeros. What am I doing wrong?