Question: You can use PHP's rand() function to generate a random integer. The rand() function accepts two arguments that specify the minimum and maximum integer to

You can use PHP's rand() function to generate a random integer. The rand() function accepts two arguments that specify the minimum and maximum integer to generate, respectively. For example, the statement $RandNum = rand(10, 20) generates a random integer between 10 and 20 and assigns the number to the $RandNum variable. Create a guessing game that uses sessions to store a random number between 0 and 100, along with the number of guesses the user has attempted. Each time the user guesses wrong, display the number of times the user has guessed. Include a Give Up link that displays the generated number for the current game. Also include a Start Over link that deletes the user session and uses the header(location: URL) function to navigate to the main page.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!