I have the following table & field setup:
Table: posting
Fields: start_date, start_time, end_date, end_time
I've placed the code snippet within the posting table | Add Page: Before record added Event
)-2);
$arr = db2time($str);
$start = mktime($arr[3],$arr[4],$arr[5],$arr[1],$arr[2],$arr[0]);
$str = substr($values["end_date"],1,strlen($values["end_date"])-2);
$arr = db2time($str);
$end = mktime($arr[3],$arr[4],$arr[5],$arr[1],$arr[2],$arr[0]);
if ($end<$start)
{
echo "Error.....";
return false;
}
else
return true;
I need to extend on this code to carry out the following:
1] if start_date < current date then error
2] if end_time < start_time then error
I'm not sure how to write. Your help & support would be much appreciated.
Lisa