Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function increasePoints($points, $mysqli, $user_check) {
- $result = mysqli_query($mysqli,"SELECT rewardPoints FROM users WHERE username = '$user_check'");
- $item = mysqli_fetch_assoc($result);
- $currentPoints = $item['rewardPoints'];
- $newPoints = $currentPoints + $points;
- $sqlupdate = "UPDATE users SET rewardPoints = '.$newPoints.' WHERE username = '$user_check' ";
- mysqli_query($mysqli, $sqlupdate);
- echo "<p>you have ".$newPoints."</p>";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement