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 ? Quote Link to comment https://forums.phpfreaks.com/topic/304881-how-to-update-user-balance-automatically/ 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. Quote Link to comment https://forums.phpfreaks.com/topic/304881-how-to-update-user-balance-automatically/#findComment-1550842 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 Quote Link to comment https://forums.phpfreaks.com/topic/304881-how-to-update-user-balance-automatically/#findComment-1550892 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 1 Quote Link to comment https://forums.phpfreaks.com/topic/304881-how-to-update-user-balance-automatically/#findComment-1550915 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. Quote Link to comment https://forums.phpfreaks.com/topic/304881-how-to-update-user-balance-automatically/#findComment-1550916 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.