Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- echo "Score was: ";
- $score = $_GET["score"];
- echo $score;
- $scoreInt = intval($score);
- $scoreFile = fopen ("score.txt", "w") or die("Unable to open file");
- $preScoreTxt = fread ($scoreFile, filesize("score.txt"));
- $preScore = intval($preScoreTxt);
- $post = $preScore + $scoreInt;
- fwrite($scoreFile, $post);
- fclose($scoreFile);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement