<?php 

session_start();
if (!isset($_SESSION['username'])) {
  header("location:login/main_login.php");
}

    // load up your config file
    require_once("setting.php");
    require_once(connection);
    require_once(header2);
?>
<div class="container"><div class="row justify-content-md-center">
<?php include_once(menu_penal);
?>
</div>
      <div class="row justify-content-center">
    <div class="col-5">
  <h2>Customer Payment Formate</h2> </div></div>
  <?php   require_once(payment_form);
?>
 </div>
<?php
if(isset($_POST['submit'])) {
$id= $_POST['inv'];
$name= $_POST['payment'];
$sql = "UPDATE c_bill SET  paid = '$name' WHERE c_inv = '$id'";
if ($con->query($sql) === TRUE) {
	echo '<script type="text/javascript">alert("New record:::' .$name. ':::created successfully"); location.replace("payment.php");</script>';



} else {
    echo "Error: " . $sql . "<br>" . $con->error;
}
$con->close();
}
?>
<?php   require_once(DB_DIR . "/footer.php");
?>