thewhistler1
Technical User
Does anyone know how to use strtotime to give me a variable date + 1 year?
I know how to do it using todays date like this:
$newdate = date("Y-m-d",strtotime('+1 year'));
echo $newdate ;
but I want to use a date that was entered in a form instead of todays date. I tried the following but it did not work.
$date = "2008-06-16";
$newdate = $date("Y-m-d",strtotime('+1 year'));
echo $newdate ;
Any ideas? Thanks in advance.
I know how to do it using todays date like this:
$newdate = date("Y-m-d",strtotime('+1 year'));
echo $newdate ;
but I want to use a date that was entered in a form instead of todays date. I tried the following but it did not work.
$date = "2008-06-16";
$newdate = $date("Y-m-d",strtotime('+1 year'));
echo $newdate ;
Any ideas? Thanks in advance.