I am trying to insert a date into a mysql table field using
<?php
$date=date(Y-m-d);
mysql_query("INSERT INTO table VALUES('$date')");
?>
but when I open up mysql and run SELECT * FROM table; it returns a date value of 0000-00-00 instead of the current date at time of insert. Am I misunderstanding something with the php date function?