Guest Number (Session)

Create a filename called as setnumber.php. Write in it a form for you to SET a number. After the form is submitted save the number into a session variable.


Create another filename called guessnumber.php. Write in it a form for a user to guess the previous saved number in the session variable. Once the user submit the number, your code must inform the user either the number is too high or too low. If the user guess correctly, say CONGRATULATION. You system must also count how many tries have been made by the user to guess correctly (use session variable).

[SOLUTIONS]

https://ocw.unisza.edu.my/pluginfile.php/3112/mod_page/content/1/session.php

https://ocw.unisza.edu.my/pluginfile.php/3112/mod_page/content/1/test.php

Last modified: Saturday, 23 February 2019, 10:32 AM