JezK
Edit File: test.php
<?php include("header.php"); ?> <div class="container"> <div class="container mt-3"> <div class="row"> <div class="tophead col-md-4"> <h6>ASN</h6> </div> <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> <div class="container "> <div class="table-responsive p-4 "> <table id="example" class="display bg-white tbl-border table-borderless" style="width:100%"> <thead> <tr> <th>ASN Number</th> <th>Item Code</th> <th>Item Description</th> <th>Item Quality</th> <th>Shiptment Date</th> <th>Shiptment Time</th> <th>Shiptment From Address</th> <th>Pallet No</th> <th>Total Cost</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( { "processing": true, "dataSrc": "", "sDom": 'Rfrtlip', // "sDom": 'Rlfrtlip', // "serverSide": true, // dom: 'Bfrtip', // buttons: [ // { // extend: 'csvHtml5', // text: '<i class="fa fa-file-text-o"></i>Export to csv', // titleAttr: 'CSV' // }, // ], "ajax": "objects.json", "columns": [ { "data": "ASN Number" }, { "data": "Item Code" }, { "data": "Item Description" }, { "data": "Item Quality" }, { "data": "Shiptment Date" }, { "data": "Shiptment Time" }, { "data": "Shiptment From Address" }, { "data": "Pallet No" }, { "data": "Total Cost" } ] } ); } ); </script>