I want to be able to show the following
Adrian posted his message on $date
Adrians post expires on $date + 14
I know this is not correct, but if someone can give me some pointers it would be appreciated.
depends on what format the date field is in.
MYSQL provides functions to increment dates so if retrieving the date from the database you can have it done for you.
If the date is in unix format then just add the number of seconds you want so 14 days would equal 142460*60
You have to increase date like this:
$data=now(); $data=$data+(14*24*60*60);
You only can increase a timestamp.
Hi,
use this
$displayDate = date("m-d-Y",mktime($hours,$minutes,$seconds,$month,$day+14,$year));
Replace all variables of mktime to suit your requirement.
Refer following
http://www.php.net/manual/en/function.mktime.php
Enjoy!
Piyush