I have scrit which makes revision date from current date to 2 or x years later. What I need is to create script based on date which passed 2 days over. Let s say I need to make input record in mysql db for job that were done some days ago an put that date in table and calculate revision date from that date two or x years later. Does someone have an idea how to do that?
我的部分文字:
$formDatum = mysql_real_escape_string($_POST[ formDatum ]);
$date = new DateTime();
switch ($formUsluga)
{
case 1 :
$date -> modify("+2 year");
$formRev=$date->format("Y-m-d H:i");
break;
case 2 :
date_add($date, new DateInterval("P2Y"));
$formRev=$date->format("Y-m-d H:i:s");
break;
}