T_IF error in php registration form
<p>I am trying to get an php registration form working, but i am having problems with an if/else statement. but can't quite figure it out.</p>

<pre><code>ERROR: Parse error: syntax error, unexpected 'if' (T_IF) in E:\xampp\htdocs\test\register.php on line 21
</code></pre>

<p>PHP Code :</p>

<pre><code>$username = $_POST['username'];
$password = $_POST['password'];
$repassword = $_POST['repassword'];
$email = $_POST['email'];

if ($username &amp;&amp; $password &amp;&amp; $repassword  &amp;&amp; $email)
{
        if ($password == $repassword)
        {
            include ("connect.php");
            $query = mysql_query("SELECT * FROM users WHERE username = '$username'");
            $numrows = mysql_num_rows($query)
            if($numrows == 0)         &lt;&lt;- LINE 21
            {
                echo "Username not taken";
            }
            else
            {
                echo "That username is taken!";
            }
        }
        else
            echo "Password did not match";  }
else
    echo "You did not fill in every field!";

else {//show registration form Stackoverflow cant display it properly.}
</code></pre>

<p>Maby one of you guys sees the problem. </p>

<p>Thanxs in advance,</p>

<p>Jim</p>
