not sure what's going on... i know this is something silly but my brain isn't working so well.
i have a date called $renewdate split into renew_mon, day and yr. Using the current date, I want to be able to pull up the list of users and get the accounts expiring 30 days or less from today and another list of "expired" accounts.
i can calculate the difference easy enough but i'm stuck on the after the date is past part....
if i do this:
$current_day= date ("j");
$current_mon= date ("n");
$current_yr= date ("Y");
$diff = abs(mktime(0,0,0,$renew_mon,$renew_day,$renew_yr) - mktime(0,0,0,$current_mon,$current_day,$current_yr)) / (86400);
i get the correct # but if i set it up to say
if ($diff < 31 && $diff >=1) echo "time to renew your account";
if ($diff >1) echo "account expired";
then it shows "renew" for 30 days before and after and account is only expired on the actual renewal date. 31 days after expiration it doesn't catch...