I'm in a scripting class and I've been working on this code for hours but I can't seem to get it to work. My professor says the code is mostly correct but has typos. Can someone help me?
Here what the page should look like: http://vlamp.sit.ecu.edu/~kds1102/GuessingGame.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml...
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Guessing Game</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<meta name="author" content="Revised by hdl0524"/>
</head>
<body>
<h1>Guessing Game</h1><hr />
<?php
if (isset(GET['progress'])) {
if (isset($GET['letter'])) {
$Guess = $GET['letter'];
$MysteryWord = "television;
$MysteryWordArray = str_split("television");
$ProgressArray = str_split($GET['progress']);
for ($i=0; $i<strlen($MysteryWord); ++$i); {
$CurLetter = $MysteryWordArray[$i]
if (strcmp($CurLetter, $Guess) == 0)
$ProgressArray[$i] = $Guess;
}
$Progress = implode($ProgressArray);
if ($Progress = $MysteryWord)
echo <p>You guessed correctly! The mystery word is '$Progress'.</p>";
else {
echo "<p>Mystery word: $Progress</p>";
echo "<p>Enter a letter and click the Submit Letter button.</p>";
}
else {
echo "<p>Mystery word: {$_GET['progress']}</p>";
echo "<p>You must enter a letter!</p>";
}
}
else {
echo "<p>Mystery word: *******</p>
echo "<p>Enter a letter and click the Submit Letter button.</p>";
}
?>
<form action="GuessingGame.php" method="get" enctype="application/x-www-form-urlencod...
<p><input type="text" name="letter" />
<input type="hidden" name="progress"
<?php if (isset($Progress)) echo "value='$Progress'"; else echo "value='*******'"; ?> /></p>
<p><input type="submit" value="Submit Letter" />
</form><hr />
</body>
</html>