<?php 
    include("../db.php");
    
   
if($_GET['action']=="delete" && isset($_GET['id']) && trim($_GET['id'])!='' ){
    
    
 	$res=$db->delete("enquiry_list","where id='".$_GET['id']."' ");
     header("Location: enquiry");
}
    
    
    
?>

<!DOCTYPE html>
<html>
<head>
      <title>Admin Dashboard</title>
    <?php include("meta.php"); ?>

</head>
<body> 
 
<?php include("header.php"); ?>

<?php include("sidebar.php"); 

    $data = $db->getRows("select * from payment  ");

?>

<div class="main">
    
    <div class="container">
        <div class="row">
            <div class="col-md-12">
                <div class="content-div">
                    <h2>PAYMENT LIST</h2>
                    
                    <table class="table table-hover">
  <thead class="bg-black text-white font-weight-bold ml-3" style="font-size: 15px;">
    <tr>
            <th scope="col">S.no</th>

      <th scope="col">Name</th>
      <th scope="col">Father Name</th>
      <th scope="col">Mother Name</th>
      <!--<th scope="col">Email</th>-->
       <th scope="col">Mobile</th>
      <th scope="col">Amount</th>
      <th scope="col">Txn Id</th>
      <th scope="col">Payment Date</th>
      
    </tr>
  </thead>
  <tbody>
      <?php
      $i=0;
      foreach($data as $res){$i++
          
          ?>
           <tr >
               
      <th  style="font-weight: 600; color: green;padding: 0.75rem;" ><?php echo $i?></th>
      <th style="padding: 0.75rem;" ><?php echo $res['name'];?></th>
    <th style="padding: 0.75rem;" ><?php echo $res['fname'];?></th>
     <th style="padding: 0.75rem;" ><?php echo $res['mname'];?></th>
      <!--<th style="padding: 0.75rem;" ><?php echo $res['email'];?></th>-->
      <th style="padding: 0.75rem;" ><?php echo $res['phone'];?></th>
      <th style="padding: 0.75rem;" ><?php echo $res['amount'];?></th>
      <th style="padding: 0.75rem;" ><?php echo $res['txnid'];?></th>
     <?php $phpdate = strtotime( $res['payment_date'] );
$mysqldate = date( 'd-m-Y ', $phpdate );?>
       <th style="padding: 0.75rem;" ><?php echo $mysqldate;?></th>
    
    </tr>
    <?php  }?>
   
  
  </tbody>
</table>

                    
                </div>

            </div>   
        </div>
    </div>
    
</div>
     
</body>
</html> 
