|
Check if a date is in the past or future
HI
I have a form for reservation for courses where $data_course is the
date of the course.
I want to display error message if the date has already passed.
The problem is that it returns the error message even if the date is future.
Please let me know if there is any adust to do to the code below:
$today = getdate();
if($data_course < $today) { $errors[] = 'This course already happend';}
Moises
Last edited by moisesbr; 07-28-2012 at 11:15 PM..
|