JezK
Edit File: invoices.php
<?php include("./app/checkSession.php"); if(empty($_SESSION['name'])&&$_SESSION['name']==""){ echo "<script>window.location.href='index.php'</script>"; } include("header.php"); ?> <div class="container first-position"> <div class="container mt-3 position-2"> <div class="row px-md-4 px-0 "> <div class="tophead col-md-4"> <h6>Invoices</h6> </div> <br/> <div class="col-md-4"> </div> <!-- <div class="col-md-4"> <div class="input-group search-button mb-2" style="margin-right:10px;"> <input class="form-control border-right-0 border align-self-right border-rad-left" type="text" value="" id="myInput"> <span class="input-group-append"> <button class="btn btn-outline-secondary border-left-0 border border-rad-right" type="button"> <i class="fa fa-search"></i> </button> </span> </div> </div> --> </div> </div><br/><br/> <div class="container "> <div class="table-responsive p-md-4 p-0"> <table id="example" class="display bg-white tbl-border table-borderless" style="width:100%"> <thead> <tr> <th>Invoice No</th> <th>Quatation ID</th> <th>Customer ID</th> <th>Value</th> <th>Email</th> <th>Status</th> </tr> </thead> </table> </div> </div> <!-- <div class="container position-relative"> <div class="row export_csv"> <div class="col-md-3 offset-md-9 "> <button id="export" class="btn btn-primary"><i class="fa fa-upload"></i><span class="pl-2">EXPORT.CSV</span></button> </div> </div> </div> --> </div> <!-- footer --> <?php include("footer.php"); ?> <!-- <script src="js/jquery.min.js"></script> --> <!-- <script src="js/jquery.pagination.min.js"></script> --> <!----> <script> $(document).ready(function() { $('#example').DataTable( { language: { search: "" }, "processing": true, "dataSrc": "", "sDom": 'Bfrtip', buttons: [ { extend: 'csvHtml5', text: '<i class="fa fa-file-text-o"></i>Export to csv', titleAttr: 'CSV' }, ], // "sDom": 'Rlfrtlip', // "serverSide": true, // dom: 'Bfrtip', // buttons: [ // { // extend: 'csvHtml5', // text: '<i class="fa fa-file-text-o"></i>Export to csv', // titleAttr: 'CSV' // }, // ], "ajax": "invoice.json", "columns": [ { "data": "Invoice No" }, { "data": "Quatation ID" }, { "data": "Customer" }, { "data": "Value" }, { "data": "Email" }, { "data": "Status" } ] } ); } ); </script>