Allright man, I'll help ya this time, but next time ya want help, let us know whatserver software you're using, what type of database you're integrating with, and what error you're recieving...
What I can see from your code, these problems stood out to me:
if statements do not end with a semi-colon - they are structure like this:
if ($submit) {
perform some function;
}
Do not use: endif; - just use an end bracket: }
with your if statements asking if the script came up in result of specific submit buttons being hit, you need elseif statement, such as this:
if ($submit) {
perform some function;
}
elseif ($guess) {
perform a different function;
}
After the end of the if ($tries) statement, you ended php worng: > - use this: ?>
You also ended your <body> tag twice.
Thats all I see in a glance - let me know if this helps
-Lazzerous-