HELP please - How to update tables with this?

3 replies
Hello guys, im planning to make a premium account on my game site... Example the table name is premium and the values are:

0 - non premium
1 - premium

so now, example again, if they buy a premium for 7 days... so i just need a code that will automatically change the value of 1 back to 0 after 7 days..

Please post the code here plssss...
#tables #update
  • Profile picture of the author ramsarvan
    It would be easier if you use cronjob for this task. Cronjob runs you code daily and set the value as you need. Place a file you have coded into your server. And then login to your hosting account, there you can find cronjob option.Just set time interval and path to your file.
    {{ DiscussionBoard.errors[5485978].message }}
  • Profile picture of the author wasabi20
    I will suggest you to do a cron job, like ramsarvan says.

    example. run a cronjob every day who check the buying date... if older than 7 days... update the value to 0

    That's it
    {{ DiscussionBoard.errors[5486870].message }}
    • Profile picture of the author qitzmedia
      How to do it?sorry im just newbie to php programming....

      Please help me
      {{ DiscussionBoard.errors[5498672].message }}

Trending Topics