Question: Write a sticky, self-processing PHP page that implements a simple guessing game. In this game, the program will pick a random integer between 1 and


Write a sticky, self-processing PHP page that implements a simple guessing game. In this game, the program will pick a random integer between 1 and 100 and the user will have 5 chances to guess what that number is. Note: You'll need to use session to keep track of the number between guesses The game should present the user with a brief explanation of the rules, the number of guesses remaining and a simple form into which the user can enter their guess. Each time a guess is entered, the program should decrease the number of guesses remaining, and provide the user with feedback as follows: If the guess is not an integer in the range 1 to 100, redisplay the guess form with a message indicating the problem and ask the user to try again. If the guess is correct, don't display the form, notify the user of their win and provide them with a link that they can use to play again. If the guess is incorrect, inform the user whether their guess is too high or too low and how close they are as follows: o If their guess is within 5 of the correct answer, let the user know they are "Getting Hot"; o If their guess is within 10 of the correct answer, let the user know they are "Getting Warm" o If their guess is within 15 of the correct answer, let the user know they are "Getting Cool"; and o In all other cases, let the user know they are "Totally Cold", If the user has no chances remaining, thank them for playing and provide them with a link they can use to play again. Write a sticky, self-processing PHP page that implements a simple guessing game. In this game, the program will pick a random integer between 1 and 100 and the user will have 5 chances to guess what that number is. Note: You'll need to use session to keep track of the number between guesses The game should present the user with a brief explanation of the rules, the number of guesses remaining and a simple form into which the user can enter their guess. Each time a guess is entered, the program should decrease the number of guesses remaining, and provide the user with feedback as follows: If the guess is not an integer in the range 1 to 100, redisplay the guess form with a message indicating the problem and ask the user to try again. If the guess is correct, don't display the form, notify the user of their win and provide them with a link that they can use to play again. If the guess is incorrect, inform the user whether their guess is too high or too low and how close they are as follows: o If their guess is within 5 of the correct answer, let the user know they are "Getting Hot"; o If their guess is within 10 of the correct answer, let the user know they are "Getting Warm" o If their guess is within 15 of the correct answer, let the user know they are "Getting Cool"; and o In all other cases, let the user know they are "Totally Cold", If the user has no chances remaining, thank them for playing and provide them with a link they can use to play again
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
