Parse error: syntax error, unexpected $end in ... on line 111
I've looked through everything, checked every bracket, altered everything and retried.. Tried with beggining and ending html tags. Nothing will work. I've even tried removing all of the PHP but will still get the same error..
<?php
include_once("opendb.php");
$FirstName = "";
$LastName = "";
$Comment = "";
if ($_POST["People"]){
//Get Search info
$People = explode("|",$_POST["People"]);
$FName = $People[1];
$LName = $People[0];
//Get record from the db based on search info
$FindPersonSQL = "SELECT * FROM info WHERE FirstName = '".$FName."' AND LastName = '".$LName."'";
$FindPersonResult = mysql_query($FindPersonSQL);
$FindPersonRow = mysql_fetch_array($FindPersonResult);
//fill the vars to show to screen
$FirstName = $FindPersonRow["FirstName"];
$LastName = $FindPersonRow["LastName"];
$Comment = $FindPersonRow["Comment"];
//Check if a record in the db for that user already
$FindPersonSQL = "SELECT * FROM data WHERE FirstName = '".$AleteredFirstName."' AND LastName = '".$AleteredLastName."'";
$FindPersonResult = mysql_query($FindPersonSQL);
if ($FindPersonRow = mysql_fetch_array($FindPersonResult)){
$UpdateSQL = "UPDATE data SET Comment = '".$AleteredComment."' WHERE FirstName = '".$AleteredFirstName."' AND LastName = '".$AleteredLastName."'";
$UpdateResult = mysql_query($UpdateSQL);
}
}
else{
echo ("No User Found");
}
?>
<head>
<title>Edit Info</title>
<script type="text/javascript">
function GetPerson(){
document.SelectPerson.submit();
}
</script>
</head>
<body>
<div align="center">
<?php
$sql = "SELECT * FROM info";
$result = mysql_query("$sql");
$result = mysql_query("SELECT * FROM info");
echo "<table bgcolor='#3333FF' border='1'>
<tr>
<th>FirstName</th>
<th>LastName</th>
<th>Email</th>
<th>Age</th>
<th>Sex</th>
<th>Phone</th>
<th>Address</th>
<th>Zip</th>
</tr>";
while($row = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row['FirstName'] . "</td>";
echo "<td>" . $row['LastName'] . "</td>";
echo "<td>" . $row['Email'] . "</td>";
echo "<td>" . $row['Age'] . "</td>";
echo "<td>" . $row['Sex'] . "</td>";
echo "<td>" . $row['Phone'] . "</td>";
echo "<td>" . $row['Address'] . "</td>";
echo "<td>" . $row['Zip'] . "</td>";
echo "</tr>";
echo "</table>";
?>
</div>
<br>
<br>
<br>
<br>
<form action="edit.php" method="post" id="AddPerson" name="AddPerson">
First Name: <input type="text" id="firstname" name="firstname" value="<?php echo $FirstName; ?>"><br>
Last Name: <input type="text" id="lastname" name="lastname" value="<?php echo $LastName; ?>"><br>
Comment: <input type="text" id="comment" name="comment" value="<?php echo $Comment; ?>"><br>
<input name="Edit" type="submit" id="Edit" value="Edit Person">
</form>
</body>
</html>