$appr2 = mysql_query("SELECT from_date FROM mrfs WHERE `mrf_id`='$row[0]'") or die (mysql_error());
$appr3=mysql_fetch_row($appr2);
$appr4 = mysql_query("SELECT to_date FROM mrfs WHERE `mrf_id`='$row[0]'") or die (mysql_error());
$appr5=mysql_fetch_row($appr4);
$date=date("m/d/Y");
$date1=date("m/d/Y", strtotime("$appr3[0] -8 days"));
if($date>=$date1 && $date<=$appr5[0] )
The code above says to compare two dates present date and from date
and present date and to date.
this works fine if i select any date in 2011 but not if i select any date in 2012 after changing 8 to any other value.
Pls help....