if (!$is_email_valid) {
    $Register->errors[] = "Email Error: Invalid Email address";
}
if (!$is_password_valid) {
    $Register->errors[] = "Password Error: Make sure passwords match. Are longer than 8 characters and contain atleast one character and number. ";
}
if (!$is_username_valid and !$is_email_valid and !$is_password_valid) {
}
if (!$Register->is_captcha_right($gcaptcha_sec_key)) {
    $Register->errors[] = "Please do Captcha";
}
if (strlen($new_acc) > 2) {
    $Register->errors[] = "{$new_acc} already registered";
}
if (isset($_POST["submit"])) {
    if ($Register->register_user()) {
        $Register->send_mail($mail, $mail_host_name, $mail_username, $mail_password, $mail_from, $mail_from_name, $mail_subject, $mail_body);
    } else {
        $Register->errors[] = "Couldnt' register";
    }
}
?>


<!doctype html/>
<html>
	<head>
		<title> User Registration </title>
		<meta charset="utf-8"/>
		<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
		<meta name="viewport" content="width=device-width, initial-scale=1"/>