That's because you're comparing the query result to a username, that can't give the wanted result!
$query1 = "SELECT FROM login WHERE username = $username";
$query2 = "SELECT FROM login WHERE password = $password";
why are you doing it like this? I recommend using:
$conn = odbc_connect( 'CoxFamily' , 'root' , '' );
$query="select * from login where username='$username' and password='$password'";
$result=odbc_exec($conn, $query);
$rc=odbc_fetch_into($result,$row);
if(!rc) { print "Incorrect username or password!\n<br>\n"; return 0; }
🙂Mikko