get future date
Posted: Wed Oct 02, 2013 6:58 am
Hey I know this is simple to a lot and it is to me however seems like nothing I have tried works
When I am doing is getting the current date and time and inserting it into a field which I have got to work
However I need to go up by 1 day for the date but leaving the time the same
Here is what I have
The code in bold is what I am trying to work with but its not going up by 1 day and then saving
Any help would be great
When I am doing is getting the current date and time and inserting it into a field which I have got to work
However I need to go up by 1 day for the date but leaving the time the same
Here is what I have
Code: Select all
$newdate = mysql_result($checksurfed, 0, "date");
$newtime = mysql_result($checksurfed, 0, "time");
[b]$date1 = (date($newdate, strtotime($newdate)) . " +1 day");[/b]
$do_stats = mysql_query("UPDATE table SET field1='$date1 $newtime'") or die (mysql_error());
Any help would be great