can anyone direct me to a question on how to insert the DATETIME filed from iphone via a PHP script into a MySQL database.
$dates = date('Ymd H:i:s','2010-10-12 15:09:00'); $query = "INSERT INTO timeTable(time) VALUES ('$dates')";
Thanks..
For the date() function, you must pass a timestamp as the second argument.
date()
$dates =date('Ymd H:i:s', strtotime('2010-10-12 15:09:00') );
But you already have time in good shape, and you should just do:
$dates = '2010-10-12 15:09:00';