How can i make it so that if it doesn't fine anything, then show :
print "<font size=\"2\"><b>Sorry</b></font><br>";
Cause if it doesn't find a date from a year ago the table cell looks unfinsihed and empty. I need to replace it with the above if it doesn't. I just can't figure out the if part and else part.
<?
$year=date("Y")-1;
$month=date("m");
$fname="";
$lname="";
$regdate="";
$check_day1=strtotime ($year."/".$month."/1");
if($month==12){
$month=1;
$year++;
}else{
$month++;
}
$check_day2=strtotime ($year."/".$month."/1");
$r = q("select fname,lname,rdate from members where rdate>=$check_day1 and rdate<$check_day2");
print "<td width=\"25%\" bgcolor=\"#FFFFFF\" valign=\"top\">";
while($record = f($r)){
$fname=$record["fname"];
$lname=$record["lname"];
$rdate=$record["rdate"];
$regdate = strftime ( "%d-%m-%Y" ,$rdate);
print "<font size=\"2\"><b>$fname $lname</b> <font size=\"2\" color=\"#0000FF\">$regdate</font><br>";
}
print "</td>";
?>