<?php 
session_start();
        
if(!isset($_SESSION['admin_login'])) 
    header('location:adminlogin.php');   
include '_inc/dbconn.php';
?>

<?php include 'admin_header.php' ?>
<?php include 'admin_navbar.php'?>

<div class="content-wrapper">
  <div class="content">
<div class="error-wrapper rounded border bg-white ">
              <div class="row justify-content-center">
                <div class="col-xl-4 text-center">
                  <h1 class="text-danger bold ">Debit Account</h1>
                  <p class="pt-4 pb-5 error-subtitle text-center">Fill all Information accordingly. All are required</p>

 <div class="card-body">    
<form action="debit2.php" method="POST">





<div class="form-row">
                          <div class="col-md-12 mb-3">
                            <label for="validationServer01">Customer's Name</label>
<select class="form-control" name="account">
	<option selected="selected">Select Account</option>
<?php 


$sql = "SELECT * FROM customer";
$result=  mysqli_query($con, $sql) or die(mysqli_error($con));
echo '<table>';
while($rowtwo = mysqli_fetch_array($result)){

  echo '<option value='.$rowtwo['id'].'>' .$rowtwo['name'].'</option>';
}

?>
</select>
</div>
<div class="col-md-12 mb-3">
                            <label for="validationServer01">Debit Amount</label>
<input type="number" class="form-control" name="amount">
</div>
<div class="col-md-12 mb-3">
                            <label for="validationServer01">Transaction Date</label>
<input type="date" class="form-control" name="tr_date">
</div>
<div class="col-md-12 mb-3">
                            <label for="validationServer01">Transaction Narration</label>
<textarea type="date" class="form-control" name="tr_info"></textarea>
</div>

</div>
<button class="btn btn-danger btn-block" type="submit" name="debit2" >Debit Account</button>

        </form>

                </div> 
 </div>
              </div>
            </div>

      

          </div>
        </div>

 <?php include 'footer.php'?>


