My problem is the following:
When DoExpressCheckout() is executed i have to save some data to Database, including the current time + X time
The type of the field of the database is set to "datetime"
I'm using the strtotime function in this way
date_default_timezone_set('Europe/Rome');
$currentTime = date("Y-m-d");
$expected = date('Y-m-d',strtotime($currentTime.'+ 7 days'));
echo $expected;
$sql = "INSERT INTO acquisti (durata,prezzi,expectedtime) VALUES (".$str.",".$resArray['AMT'].",".$expected.")";
echo $sql;
mysql_query($sql) or die("Errore di inserimento");
Here i have two problems:
1) The query always returns me error when putting the $expected variable into the expectedtime field 2) If i put it manually (just to try if i was stupid) it writes me 0000-00-00 (i've enabled the ALLOW_INVALID_DATES)
Any suggestions?
Thanks a lot