$username))->fetch() !== false) error(409, "Username already exists"); database_exec("INSERT INTO users (`username`, `password`) ". "VALUES(:username, :password)", array(":username" => $username, ":password" => hash_password($password))); user_login($username); } function user_login($username = false ) { if ($username === false) { $username = get_post("username"); $password = get_post("password"); } } ?>