I am trying to check whether user submitted date is within range or not.
<?php
$datesyntx = "/^(19|20)\d\d[\-\/.](0[1-9]|1[012])[\-\/.](0[1-9]|[12][0-9]|3[01])$/";
$paydate = "2015-03-01";
if (preg_match($datesyntx, $paydate)) {
if(strtotime($paydate) > strtotime('2015-04-23') && strtotime($paydate) < strtotime('2015-07-23')) {
}
}
?>
It is not working what actually I am trying to get.