Jump to content
waqarali

How to Update user balance automatically?

Recommended Posts

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 ?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

  • Like 1

Share this post


Link to post
Share on other sites

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. :D

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.