Advertisement
Guest User

Untitled

a guest
Jul 28th, 2015
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. <?php
  2. session_start();
  3. $username = $_SESSION['username'];
  4. $amount = $_SESSION['amount'];
  5. $message = $_SESSION['message'];
  6. $send = "$username donated $amount";
  7. $Vdata = file_get_contents('donation.txt');
  8. $cumoney = file_get_contents('money.txt');
  9. $newmoney = $amount + $cumoney;
  10. $handle4 = fopen("money.txt", "w");
  11. fwrite($handle4, $newmoney);
  12. fclose($handle4);
  13. if($Vdata == $send){
  14. $handle = fopen("donation.txt", "w");
  15. fwrite($handle, $username ." donated ". $amount);
  16. fclose($handle);
  17. $handle2 = fopen("donationmsg.txt", "w");
  18. fwrite($handle2, $message);
  19. fclose($handle2);
  20. header ("Location: ...");
  21. }else{
  22. $handle = fopen("donation.txt", "w");
  23. fwrite($handle, $username ." donated ". $amount);
  24. fclose($handle);
  25. $handle2 = fopen("donationmsg.txt", "w");
  26. fwrite($handle2, $message);
  27. fclose($handle2);
  28. header ("Location: ...");
  29. }
  30. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement