I need to insert a date into my database that is exactly 24 hours from the time the record was added.
I know how to insert todays date and time using $today = date("Y, m, d, H:i:s")
But I need it to display the date/time tomorrow.
$tomorrow = date("Y, m, d, H:i:s",time()+60*60*24);
Try that
Thanks
Can you do the same to enter the date in a years time. $nextyear = date("Y, m, d, H:i:s",date("Y")+1); doesn't seem to work.
Solved it
$nextyear1 = date("Y")+1; $nextyear = date("m, d, H:i:s");
<?php echo $nextyear1 ?>, <?php echo $nextyear ?> seems to work