Hi I'm a newbie having trouble entering a date into my mysql database
When I write:
$query = "INSERT INTO test3 (play_date) VALUES ('2007-10-10 10:10:10')";
it works perfectly...
however when I set
$query = "INSERT INTO test3 (play_date) VALUES ('$play_date')";
$play_date = ('2007-10-10 10:10:10');
$play_date = date('2007-10-10 10:10:10');
(or it seems anything else I do)
it doesn't work.....and instead enters 0000-00-00 00:00:00
when I say echo $play_date it looks like the perfect format on screen...
I've been working on this for days...and I'm pulling my hair out...the solution has to be SO simple but I just can't get it right...can someone help me out?
Helpful suggestions would be greatly appreciated.