I need to set a variable to the current date in this format: eg: 2012-05-12 , I get that's YYYY-MM-DD ?
I've tried:
$date = date("yyyy-mm-dd", strtotime(now));
but this is not saving the date to mysql so it's coming out as 0000-00-00.
The field is set as type: date in the mysql db.
What am I doing wrong here?