My table “users” has a column “vip” and “vipudlob”.
vipudlob = the timestamp where the “vip membership” expired.
I will make some kind of cronjob which sends a “reminder” to users, when there is 7 days left. And update user(s) when the “vipudlob” is expired to vip=0, vipudlob=0
Can any good-guy help me with this?
i tried something like this, but doesn’t work properly
if ( time() >= $row['udlob']):
echo "Your membership expired"
else: //still working
if ( date("d", $row['udlob']) <= 7):
echo "7 days back!"
endif
endif;
First get the Currant timestamp using time function then Check if it’s expired
For example
$currunt_timestamp = time();
$membership_expire = “”;