Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- $username = $_SESSION['username'];
- $amount = $_SESSION['amount'];
- $message = $_SESSION['message'];
- $send = "$username donated $amount";
- $Vdata = file_get_contents('donation.txt');
- $cumoney = file_get_contents('money.txt');
- $newmoney = $amount + $cumoney;
- $handle4 = fopen("money.txt", "w");
- fwrite($handle4, $newmoney);
- fclose($handle4);
- if($Vdata == $send){
- $handle = fopen("donation.txt", "w");
- fwrite($handle, $username ." donated ". $amount);
- fclose($handle);
- $handle2 = fopen("donationmsg.txt", "w");
- fwrite($handle2, $message);
- fclose($handle2);
- header ("Location: ...");
- }else{
- $handle = fopen("donation.txt", "w");
- fwrite($handle, $username ." donated ". $amount);
- fclose($handle);
- $handle2 = fopen("donationmsg.txt", "w");
- fwrite($handle2, $message);
- fclose($handle2);
- header ("Location: ...");
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement