<?php
$err_alert = '';
if(isset($_POST['signinAcct'])){
	$userAccess = new bankUser;
		if($userAccess->login_user($_POST['form_email'],$_POST['password'])){
      echo "<script>location.replace('/welcome');</script>";
    }else{
      $err_alert = '<div class="alert alert-danger text-small">Unable to Login, <br>Please Check info, and try again!</div>';
    }
}
?>
<!-- <form action="/login" method="post" id="my_login_form">
                    <?php //echo $err_alert; ?>
                        <input type="text" placeholder="IBAN"  name="acc_no">
                        <input type="password" placeholder="Password"  name="password">
                        <input type="checkbox" id="keep-logged-in">
                        <label for="keep-logged-in">Keep me logged in</label>
                        <button class="button button-3 txt-upper" type="submit" name="signinAcct">
                            <div>
                                <i class="fas fa-check"></i>
                                <span>login</span>
                            </div>
                        </button>
                    </form> -->
                    <div class="stricky-header stricked-menu main-menu">
            <div class="sticky-header__content"></div><!-- /.sticky-header__content -->
        </div><!-- /.stricky-header -->




        <!--Start Main Contact Form Area-->
        <section class="main-contact-form-area">
            <div class="container">
                <div class="row d-flex justify-content-center">

                    <div class="col-md-6">
                        <div class="contact-info-box-style1">
                            <div class="box1"></div>
                            <div class="title text-center">
                                <h2>Online Banking<br></h2>
                                <p>Welcome!</p>
                            </div>
<div class="contact-form" style="background:none;padding-top:0;">
<?php echo $err_alert; ?>
                            <form id="login-form" name="loginform" class="default-form2"
                                action="/login" method="post">
                                <div class="form-group">
                                    <label>Account Number:</label>
                                    <div class="input-box">
                                        <input type="text" name="form_email" id="formEmail" placeholder="" required>
                                    </div>
                                </div>

                                <div class="form-group ">
                                    <label>Password:</label>
                                    <div class="input-box">
                                        <input type="password" name="password" value="" id="formPhone" placeholder="" required>
                                    </div>
                                </div>



                                <div class="button-box d-flex justify-content-end">
                                    <button class="btn-one" name="signinAcct" type="submit" data-loading-text="Please wait...">
                                        <span class="txt">
                                            LOGIN
                                        </span>
                                    </button>
                                </div>

                            </form>
                            </div>
                            

                        </div>
                    </div>




                </div>
            </div>
        </section>
        <!--End Main Contact Form Area-->



