<?php
include "../classes/class.loader.php";

$db = new db();
$res = $db->query("SELECT * FROM users WHERE username = '" . $_POST['username'] . "'");
if ($res->num_rows > 0) {
    echo 0;
} else {
    echo 1;
}