Code: Select all
<?php
$errorMsg = "";
$combUn = "false";
$hintMsg = "";
?>
<?php
if (isset($_POST['ans_one']))
{
$ans1 = $_POST['ans_one'];
$ans2 = $_POST['ans_two'];
$ans3 = $_POST['ans_three'];
$ans4 = $_POST['ans_four'];
$ans5 = $_POST['ans_five']; <-- Line 15
if ( $ans1 == "VIIXIV" && $ans2 == "TARDIS" && $ans3 == "RIVER SONG" && $ans4 == "STAR DESTROYER" && $ans5 == "SPIDER" )
{
$combUn = "true";
}
else
{
$errorMsg = '<font color="red">Combination was entered incorrectly, please try again!</font>';
}
}
?>
<?php
if ($combUn == "false")
{
$hintMsg = "<b><u><i>Hint:</b></u> What date did we get together?</i>";
}
if ($combUn == "true")
{
$hintMsg = "<b><u><i>Hint:</b></u> Use a GPS:</i> 29.414558, -98.628156";
}
?>
<title>Combination Hunt</title>
<style>
body { background-color: lightgray }
.tbl1 { background:#FFFFFF
url(box.png) no-repeat 4px 4px;
padding: 4px 4px 4px 22px;
height: 25px;
}
</style>
<center><h1>Combination Hunt</h1></center>
<br>
<center>You must find the correct combination to unlock the final destination</center>
<br><br><br><br><br><br><br><br><br>
<center>
<form action="index.php" method="post" enctype="multipart/form-data">
<input type="text" name="ans_one" class="tbl1" size="4" maxlength="3">
<input type="text" name="ans_two" class="tbl1" size="4" maxlength="3">
<input type="text" name="ans_three" class="tbl1" size="4" maxlength="3">
<input type="text" name="ans_four" class="tbl1" size="4" maxlength="3">
<input type="text" name="ans_five" class="tbl1" size="4" maxlength="3">
<br><br><br><br>
<input type="image" name="submit" src="lock.png" length="64" height="64" border="0" alt="submit">
</form>
</center>
<center>
<i>Make sure caps lock is ON when answering questions</i>
<br><br>
<?php
print "$errorMsg";
print "<br>";
print "$hintMsg";
?>
</center>
Error: PHP Parse error: syntax error, unexpected ';' in index.php on line 15.
This is hosted on Halls Server. It works on WAMP, but not when uploaded on the server