waqarali Posted September 6, 2017 Share Posted September 6, 2017 i am creating a investment type website. where user deposit money and i will provide them 10 % profit. my question is. How i can update user balance automatically after 24 hours of deposit ? Link to comment Share on other sites More sharing options...
ginerjm Posted September 6, 2017 Share Posted September 6, 2017 Be sure you save the datetime that the deposit was made. Also - are you paying compound dividends? Write a script that does the calculation that you envision. Test it out. When you are happy with the operation convert it to a cron job and schedule it for every 24 hours. Read. Link to comment Share on other sites More sharing options...
waqarali Posted September 7, 2017 Author Share Posted September 7, 2017 please can you write some example code Link to comment Share on other sites More sharing options...
ginerjm Posted September 7, 2017 Share Posted September 7, 2017 Uh, no. We don't do that here. This is a "help" forum where help means we help you WITH YOUR code. If you want someone to write it for you check out the other forum where you can hire someone. Hint: The script starts with <?php Link to comment Share on other sites More sharing options...
dalecosp Posted September 7, 2017 Share Posted September 7, 2017 Uh, no. We don't do that here. This is a "help" forum where help means we help you WITH YOUR code. If you want someone to write it for you check out the other forum where you can hire someone. Hint: The script starts with <?php Great answer! Of course, if it's run by cron, it might actually start with: #!/usr/bin/env php And then have your line of code next. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.