JezK
Edit File: usermanagement.php
<?php include("./app/checkSession.php"); if(empty($_SESSION['name'])&&$_SESSION['name']==""){ echo "<script>window.location.href='index.php'</script>"; } include("header.php"); include_once("../master_admin/app/adminObj.php"); $user_list=$adminObj->getUserlist(); //print_r ($user_list); ?> <div class="container"> <div class="container mt-3"> <div class="row px-md-4 px-0"> <div class="tophead col-md-4"> <h6>User Management</h6> </div> <div class="col-md-4"> </div> <div class="col-md-4 text-md-right my-3 mt-md-0"> <a href="adduser.php"><button class="add_user_btn"><img src="images/addwarehouse_selected.png"></i></button><span class="addusertext pl-2">Add user</span> </a> </div> </div> </div> <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>Name</th> <th>Email</th> <th>Phone Number</th> <th>Country</th> <th>Status</th> <th>Action</th> </tr> </thead> <tbody> <?php foreach($user_list as $val) { ?> <tr> <td><?php echo $val['first_name'] ?></td> <td><?php echo $val['email'] ?></td> <td><?php echo $val['mobile_number'] ?></td> <td><?php echo $val['city_name'] ?></td> <td>active</td> <td><a href='edituser.php'><i class='fa fa-pencil'></i></a></td> </tr> <?php } ?> </tbody> </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": '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": "usermng.json", // "columns": [ // { "data": "Name" }, // { "data": "Email" }, // { "data": "Phone Number" }, // { "data": "Country" }, // { "data": "Status" }, // { "data": "Action" } // ] } ); } ); </script>