Oops..(Hit send prematurely.)

  $currentmonth = date("m");
  $currentday = date("d");
  $year = date("Y");
  $newmonth = $currentmonth + 3;
  if ($newmonth > 12){
    $newmonth = $newmonth % 12;
    $year = $currentyear + 1;
  $3months = date("Y-m-d",mktime(0,0,0,$newmonth,$currentday,$year));

This should get me exactly 3 months later and also checks for if its a later 
month (oct, nov, or dec) then it goes to the next year.  How could I check to 
see if the new date doesn't fall on Feb. 30th or whatever?  If someone signs 
up on the 31st of a month it'll never end on a month with 31 days.


Reply via email to