if (count($_POST) > 0) {
include("dbconnection.php");
$username = $_POST["username"];
$password = $_POST["password"];
$qry = mysql_query("SELECT * FROM users WHERE ('username' = $username)") or die(mysql_error());
$data = mysql_fetch_array($qry, MYSQL_ASSOC);
if (mysql_num_rows($data) > 0){...