JezK
Edit File: report_management.php
<?php include('admin_functions.php'); if($_SESSION['username']=='') { echo "<script>location.replace('index.php');</script>" ; } $admin=new adm_functions(); $reposrts = $admin->get_reports(); $i=1; $reposrtdata =''; foreach($reposrts as $k=>$v){ $reposrtdata .='<tr> <td>'.$i.'</td> <td><a href="news_management_edit.php?id='.$v['newsid'].'">'.$v['newstitle'].'</a></td> <td>'.$v['username'].'</td> <td>'.$v['reporttime'].'</td> <td><a href="report_management_view.php?id='.$v['reportid'].'"><input type="button" class="btn btn-success" value="View"></a> <a href="report_management_delete.php?id='.$v['reportid'].'"><input type="button" class="btn btn-danger" value="Delete"></a> </td> </tr>'; $i++; } $currentPage='report_management'; include"header.php" ?> <div class="main-panel"> <nav class="navbar navbar-default"> <div class="container-fluid"> <div class="navbar-header"> <button type="button" class="navbar-toggle"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar bar1"></span> <span class="icon-bar bar2"></span> <span class="icon-bar bar3"></span> </button> <a class="navbar-brand" href="#">Report Management</a> </div> </div> <div class="collapse navbar-collapse"> </div> </nav> <div class="content"> <div class="container-fluid"> <div class="row"> <div class="col-md-12"> <div class="content table-responsive table-full-width"> <table class="table table-striped" id="example"> <thead> <th>S.No</th> <th>News Title</th> <th>Reported User</th> <th>Report Date & Time</th> <th>Action</th> </thead> <tbody> <?php echo $reposrtdata; ?> </tbody> </table> </div> </div> </div> </div> </div> <?php include"footer.php" ?> <script> $(document).ready(function() { $('#example').DataTable(); }) </script> <link href="https://cdn.datatables.net/1.10.13/css/jquery.dataTables.min.css" rel="stylesheet"> <script src="//code.jquery.com/jquery-1.12.4.js"></script> <script src="https://cdn.datatables.net/1.10.13/js/jquery.dataTables.min.js"></script>