i have a mysql table which has a date column called DateStarted, with a default value of '0000-00-00'.
every time i tried to insert the date, it only inserted '0000-00-00'.
i first get the current date with my function "getdate":
function get_date() {
$thedate = date("Y-d-m");
return $thedate;
}
and use the following insert statement:
"INSERT INTO projects (YearID, DateStarted,Info,ProjTitle) VALUES ('$yearid','$datestarted','$info','$projtitle')"
when $datestarted is the value returned by the get_date function.
thanks in advance
Arik :rolleyes: