Welcome to Baby Shark Roulette! See if you can make it past round 5! Guess a number 1 through 6. '; } else { error_log("getting a guess"); $_SESSION['guess_count']++; if ($_SESSION['the_number'] == $_REQUEST['Digits']) { error_log("You just Lost the game\n"); lost(); } elseif (in_array($_REQUEST['Digits'], $_SESSION['guesses'])) { error_log("You just Lost for guessing the same number twice\n"); lost(); } elseif ( $_SESSION['guess_count'] == 5 ) { error_log("Made 5 guesses without dying\n"); echo ' https://delta.tollfreegateway.com/cc2020/sounds/gotit.mp3 You just won by surviving 5 rounds!! Have some Happy Music! https://delta.tollfreegateway.com/cc2020/sounds/babyshark.mp3 '; die(); } $_SESSION['guesses'][] = $_REQUEST['Digits']; echo ' You have guessed '; echo $_REQUEST['Digits']; echo ' and are safe for now. Guess again. '; } function lost(){ echo ' Sorry you Have lost. https://delta.tollfreegateway.com/cc2020/sounds/order66.mp3 https://delta.tollfreegateway.com/cc2020/sounds/babyshark.mp3 '; die(); } ?>