I found 2 syntax errors: (1) you had an unwanted semi-colon after the IF condition where you check the login and password values, and (2) the "{" needs to come after the "else". Also, just for consistency, and ease in debugging, I'd recommend using braces with all if/else blocks, even if they're only one-liners:
<?php
$username = $_POST['username'];
$password = $_POST['password'];
if ($username && $password) {
$connect = mysql_connect("localhost", "root", "") or die("couldn't connect!!");
mysql_select_db("phplogin") or die("Couldn't find db!");
$query = mysql_query("select * from users where username='$username'");
$numrows = mysql_num_rows($query);
if ($numrows != 0) {
while ($row = mysql_fetch_assoc($query)); {
$dbusername = $row['username'];
$dbpassword = $row['password'];
}
// check to see if they match!
if ($username == $dbusername && $password == $dbpassword) {
echo " You are in!";
} else {
echo "Incorrect Password!";
}
} else {
die("That user doesn't exist!");
}
} else {
die("Please enter a username and password");
}
?>