Give a new amount of something when greater than a defined amount

Okay so I am trying to award jackpot entries every time a user completes a task, but I want to give out more than one entry when the task awards more than a certain amount.

Let me break this down.

When a user completes a task that awards $0.05 or more they receive 1 entry into the jackpot. What I am trying to achieve is this. When they complete a task that is worth $0.50 they receive an additional 1 entry and then for every $0.25 more they get another 1 so if they complete a task worth $1.00 they should get a total of 4 entries. 1 for the initial $0.05, 1 for the task being worth $0.50, 1 for reaching $0.75, and 1 more for reaching $1.00

I am not sure how to go about doing this. So all I have when it comes to updating in the database is this.

if($offprate >= $rafminp || $offcrate >= $rafminc){
$stmt=$db->prepare("UPDATE accounts SET jackpot_e=jackpot_e+'1' WHERE username = ?");
$stmt->bind_param('s', $username);

which is just for the initial $0.15

Leave a Reply


Hire Me
Follow Me!
Most Popular Articles & Pages
Because your vote is Important
Sorry, there are no polls available at the moment.