JezK
Edit File: users.php
<?php session_start(); error_reporting(0); include("./app/admin_functions.php"); $connect=new admin(); $connect->dbconnection(); $date=''; $currentDate=''; $select_status=''; if($_SERVER['REQUEST_METHOD'] == 'GET') { $date=$_GET['date']; $selectStatus=$_GET['select_staus']; $currentDate = $date; $select_status=$selectStatus; $data=$connect->getUsers($date,$selectStatus); $users=''; if($data != 0) { $j=1; for($i=0;$i<count($data);$i++) { $paymentStatus = ($data[$i]['payement_status'] == 0)?'Not Paid':'Paid'; $users .= '<tr> <td>'.$j++.'</td> <td>'.$data[$i]['name'].'</td> <td>'.$data[$i]['email'].'</td> <td>'.$data[$i]['mobile'].'</td> <td>'.$data[$i]['college'].'</td> <td>'.Date('Y-m-d',strtotime($data[$i]['createdTime'])).'</td> <td>'.$data[$i]['payment_id'].'</td> <td>'.$paymentStatus.'</td> <td>'.$data[$i]['interest'].'</td> </tr>'; } } } //print_r($data);exit; ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="format-detection" content="telephone=no" /> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="description" content=""> <meta name="author" content=""> <title>:: Registration</title> <link rel="stylesheet" type="text/css" media="all" href="css/styles_slider.css"> <!-- Bootstrap Core CSS --> <link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet"> <!-- Theme CSS --> <link href="css/freelancer.css" rel="stylesheet"> <link href="css/mui.css" rel="stylesheet"> <link href="css/style.css" rel="stylesheet"> <script type="text/javascript" src="js/jquery.min.js"></script> <!-- data tables --> <script src="https://code.jquery.com/jquery-1.12.4.js"></script> <script src="https://cdn.datatables.net/1.10.13/js/jquery.dataTables.min.js"></script> <link href="https://cdn.datatables.net/1.10.13/css/jquery.dataTables.min.css" rel="stylesheet"> <script type="text/javascript" src="js/responsiveCarousel.min.js"></script> <script type="text/javascript" src="js/mui.js">pri</script> <!--<script type="text/javascript" src ="validations.js"></script>--> <!--datepicker--> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.5.0/css/bootstrap-datepicker3.min.css"> <script type='text/javascript' src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.5.0/js/bootstrap-datepicker.min.js"></script> <script type='text/javascript'> $(function(){ $('#datetimepicker').datepicker({ format: 'yyyy-mm-dd', endDate: '+0d', autoclose: true }); }); </script> <script type="text/javascript"> $(document).ready(function () { $('#example').DataTable(); }); </script> </head> <body> <!-- Navigation --> <nav id="mainNav" class="navbar navbar-default navbar-fixed-top navbar-custom"> <div class="container"> <!-- Brand and toggle get grouped for better mobile display --> <div class="logo"> <a class="navbar-brand navbar-brand-cstm" href="index.html"> <img src="images/logo.png" class="logres"> </a> </div> <!-- Collect the nav links, forms, and other content for toggling --> <!-- <div class="pull-right"> <a href=""> <img src="images/register-now.png" class="reglogo"></a> </div>--> </div> <!-- /.navbar-collapse --> </div> <!-- /.container-fluid --> </nav> <!--form Grid Section --> <div class="container-fluid" style="margin-top:100px;"> <form action=""> <div class="form-group col-md-3"> <div class='input-group date' id='datetimepicker'> <input type='text' name="date" id="date" value="<?= $currentDate; ?>" class="form-control" /> <span class="input-group-addon"> <span class="glyphicon glyphicon-calendar"></span> </span> </div> </div> <div class="form-group col-md-1"> <input type="submit" name="submit" class="btn btn-info"> </div> <div class="col-md-3"></div> <label class="col-md-2">Payment Status:</label> <div class="col-md-3 "> <select class="form-control" name="select_staus" id="select_staus"> <option value='0' <?php if($select_status == "0") { echo "selected"; } ?>>All</option> <option value='1' <?php if($select_status == "1") { echo "selected"; } ?>>Paid</option> <option value='2' <?php if($select_status == "2") { echo "selected"; } ?>>Not Paid</option> </select> </div> </form> <div class="col-md-12"> <table id="example" class="table table-striped table-bordered" cellspacing="0"> <thead> <tr> <th>S.No</th> <th>Name</th> <th>Email</th> <th>Mobile Number</th> <!--<th>Alternative Number</th>--> <!--<th>Family member No</th>--> <th>College</th> <th style="width:65px;">Date</th> <th>Transaction ID</th> <th>Payment Status</th> <th>Area of Interest</th> </tr> </thead> <tbody> <?php echo $users; ?> </tbody> <tfoot></tfoot> </table> </div> </div> </body> </html>