D
D
DarekDD2018-03-16 02:50:00
PHP
DarekDD, 2018-03-16 02:50:00

Counter script like 0.00000, how to do it when registering an account?

Hello. I tried to make a counter after logging into the account.
For example, you logged into your account and see a counter of the format 0.00000, you need to make it so that when you add a certain amount, it increases by the specified number.
In general, for example, the counter works at a speed of +2 per second, when replenishing the balance, the condition is 1 rub = 0.00003
, that is, if you replenish in the amount of 1 ruble, the speed of the counter increases and it is already dialed not 0.00002 per second, but 0.00005 per second

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
Pavlo Ponomarenko, 2018-03-16
@TheShock

There are examples here to start with to find a solution:
https://www.electrictoolbox.com/using-settimeout-j...
Here, in the first answer, more modern and simpler:
https://stackoverflow.com/questions /6893130/how-to...

A
Andrey Lezhnin, 2018-03-20
@ALejnin

https://jsfiddle.net/89tvu08L/13/
updateCount() must be called on replenishment. It's just a frontend. I suspect that this data will then be accepted, processed and stored somewhere - do not forget to properly check them at the entrance.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question