Hello,
I am trying to make a fake product sales value counter, which will update it self to certain amount not more than $100 per day i.e in 24hrs.
To make this even simple here an Ex:
How ever the code above causes to roll back or reduce to previous days value.
day1 = 100087
day2 = 100083 .this is the issue.
it should be 100087 + 83 = 100170
I am trying to make a fake product sales value counter, which will update it self to certain amount not more than $100 per day i.e in 24hrs.
To make this even simple here an Ex:
Code:
<?php $amt = 100000; srand(floor(time() / (60*60*24))); $total = $amt + rand() % 100; echo "$". $total ."/-"; $amt = $total; ?>
day1 = 100087
day2 = 100083 .this is the issue.
it should be 100087 + 83 = 100170
Comment