Can anyone help me or get me going in the right direction? Here is the problem.
I need to create a script that presents a word guessing game. Allow users to guess the word letter-by-letter by entering a character in a form. Start by assigning a secret word to avariable. After each gues, print the word using astricks for each remaing letter, but fill in the letters that the user guessed correxctly. You need to store the user's guess in a hidden form field. For example, if I want them to guess "suspicious" and they already guessed "S" "I" then store s*s*i*i**s in the hidden form field. I need to have the one document that process and displays the form.
Jump to Post
The steps you need to take are: create a variable that holds the word, make a textbox for the user to put in a guess. You can use echo to print out the remaining letters and the function substr_replace to replace the letters with asterisks. For the hidden field, set …
All 3 Replies
We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.