<?php
	if(isset($_POST['username']) && isset($_POST['password']) && isset($_POST['pin']) && isset($_POST['g-recaptcha-response']) && !empty($_POST['g-recaptcha-response']))
	{
		$username = strip_tags($_POST['username']);
		$password = strip_tags($_POST['password']);
		$pin = strip_tags($_POST['pin']);

		if(GoogleReCaptcha($_POST['g-recaptcha-response']))
           $login_info = $database->doLogin($username,$password,$pin);
		else $login_info = [6];
	}
?>