Okay, so look at the loop within the guess branch. If you mach the char, you show the char, otherwise you replace it with *. This isn't what you want to do; you've already created the *'s within the okay source branch, so you've already got the string you need. All you need to do is go through the actualWord char, and check to see if this current character is found. If it is, replace the same offset of the wordField's text with the replaced value from actual word.
Do the actual write back after the loop, not within it. So, create a new char array from the wordField, foreach of the chars within the actual word check to see if char = entered char, and if so replace the new char's value with the same char from the actualWord in the corresponding offset. Then when you've checked all chars, write the new char array back into the wordField. I suggest taking from the actualWord instead of the guessed char since if you want to make an case insensitive replacement, it's simply a matter of altering the comparison.
header('HTTP/1.1 420 Enhance Your Calm');