Date Comparison
| From: | David Stoltz | Date: | Fri, 28 Aug 2009 14:12:50 +0000 |
| Subject: | Date Comparison | ||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-297419@lists.php.net to get a copy of this message | ||
How to I ensure a variable date is not in the past, compared to the
current date? Here's how I'm trying, unsuccessfully:
$nextdate = "8/2/2009";
if(strtotime($nextdate)<=getdate()){
echo "Sorry, your next evaluation date cannot be in the past,
Click BACK to continue.";
exit;
}