Guest User

Untitled

a guest
Feb 19th, 2018
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. <?
  2. include "../includes/head3.php";
  3.  
  4. $name = $_POST["name"];
  5. $name = strip_tags($name);
  6. $change = $_POST["change"];
  7. $amount = $_POST["amount"];
  8. $description = $_POST["description"];
  9.  
  10.  
  11.  
  12.  
  13. if ($change == add) {
  14. $add = "+" . $amount;
  15. print "$add";
  16. mysql_query("Update APSLOG set Amount = Amount + '$amount', Description = '$description', Change = '$add' WHERE Name = '$name'");
  17. echo "The points have been added";
  18. }
  19. else {
  20. $sub = "-" . '$amount';
  21. mysql_query("Update APSLOG set Amount = Amount - '$amount', Description = '$description', Change = '$sub' WHERE Name = '$name'");
  22. echo "The points have been subtracted";
  23. }
  24.  
  25. ?>
Add Comment
Please, Sign In to add comment