My browser gives the error Expecting ENDIF on line 26 with the PHP script below. I have been staring at this code for half an hour now... as far as I can see all if clauses are closed at the end. Maybe someone with a fresh perspective will see the problem? Thanks in advance!

<HTML>
<HEAD>
<TITLE>Administration Area - Users - New user</TITLE>
</HEAD>
<BODY>
<h1>Users Admin: delete user</h1>
<?
require("../includes/includes.inc");

if ($submit):
$sql = mysql_query("DELETE FROM users WHERE userID='$userID'");
if ($sql) {
echo("<P>User deleted.");
} else {
echo("<p>Houston, we have a problem. Error: " . mysql_error() );
}

else:
$result = mysql_query("SELECT * FROM users WHERE userID = '$userID'");
if (!$result) {
echo("<p>Houston, we have a problem. Error: " . mysql_error() . "</P>");
exit();
}
$row = mysql_fetch_array($result);

<FORM ACTION="<? echo($PHP_SELF); ?>" METHOD=POST>
<P>Are you sure you want to delete user <? echo ($row["fname"] . " " . $row["lname"]); ?> ?
<p>
<? // <INPUT TYPE=HIDDEN NAME="userID" VALUE="echo $row["userID"]"> ?>
<INPUT TYPE=SUBMIT NAME="submit" VALUE="YES">
</FORM>

<p><A href="usersadmin.php">Back to users admin</a>

</BODY>
</HTML>
<? endif; ?>