Hi,
I have a question...
I have created a PHP system where you can purchase various membership systems (e.g Bronze, Silver and Gold). When the membership is purchased it updates the following:
Sets "package_bronze" to "1"
Inserts date and time + 1 month into "bronze_exp_date" (e.g today is 16/07/2013, so it'll set the exp date to 16/08/2013)...
I want to setup a cronjob so that every 5 minutes it'll run a PHP script to tell the database whether or not the users membership should have been set from "1" back to "0".
I need some help with writing that code...
I'm assuming it would be something like:
If a certain user's expiry date has passed then set the certain package variable date to 0 ...
Could anyone please help me with the mysql query for it and the php "if" statements?
Regards,
Echo-Tech