I'm trying to add 1 week to a date as a Before Record Added event. This code works when I save it in a page called date.php:[codebox]$nextweek = mktime(0, 0, 0, date("m"), date("d")+7, date("Y"));
echo "One week from today will be ".date("m/d/Y", $nextweek).".</br>";[/codebox]
But, it fails in tablename_events.php.
[codebox]$values["call_back_date"] = mktime(0, 0, 0, date("m"), date("d")+7, date("Y"));[/codebox]
It returns the number of seconds instead of a good date. How should I fix it?