Page 1 of 1

ensuring a date is not in the past

Posted: Fri Feb 02, 2007 8:56 am
by hame22
Hi

I have a form where a user selects a date.

How do I in PHP ensure that this date is not in the past?

Thanks in advance

Posted: Fri Feb 02, 2007 9:04 am
by Ollie Saunders
use strtotime() and time() and the greater than operator (>)