Another problem :-(

This wont authenticate properly -- lets anyone go in no matter what the password.

<?
if ($submit)
{
if (!$memberID &#0124; &#0124; !$password2)
{
$error1 = "<p>You must enter both a member ID an password.<p>Please go back and fill in all necessary fields.";
}
else
{
mysql_connect("site", "uname", "pass");

$query = "SELECT memberID, password
FROM Applicants
WHERE memberID=$memberID";
$result = mysql_db_query("db", $query);

if ($result) {
while ($r = mysql_fetch_array($result)) {
$memberID = $r["memberID"];
$password = $r["password"];

if ($password2 == $password)
{
Header("Location: login.php3?memberID=$memberID");
}
else
{
echo "Your member ID and password do not match. Please try again.";
}

}
}

}
}

if (!$submit &#0124; &#0124; $error1) {
echo $error1;
}
if (!$submit) {
?>
<form method=post action="login.php3?memberID=$memberID">
<table width="300" cellspacing="0" cellpadding="3" align="CENTER" bgcolor="#A2A200">
<th align="LEFT" bgcolor="#4A4A4A" colspan="2"><h2>Log In:</h2></th>
<tr>
<td align="right"><h1>Member ID:</h1></td>
<td align="left"><h5><input type=text name=memberID size=12 maxlength="20"></h5></td>
</tr>
<tr>
<td align="right"><h5>Password:</h5></td>
<td align="left"><h5><input type=text name=password2 size=6 maxlength="6"></h5></td>
</tr>
<tr>
<td colspan="2"><h2><center><br><input type=submit name=submit value="Log In"></center></h2></td>
</tr>
</table>
</form>
<?
}
?>

I know I did something real careless, but can't figure it out now.

Thanks,
Sana