JezK
Edit File: news_filtration.php
<?php include('admin_functions.php'); if($_SESSION['username']=='') { echo "<script>location.replace('index.php');</script>" ; } $admin=new adm_functions(); $filterdata = $admin->get_filternews(); $filter_data = ''; $i =1; foreach($filterdata as $k=>$val){ $filter_data .= ' <tr><td>'.$i.'</td> <td>'.$val['title'].'</td> <td>'.$val['postdate'].'</td> <td>'.$val['owner'].'</td> <td><a href="news_filteration_view.php?id='.$val['id'].'"><input type="button" class="btn btn-success" value="View"></a> <a href="news_filteration_edit.php?id='.$val['id'].'"><input type="button" class="btn btn-info" value="Edit"></a> <a href="filter_management_delete.php?id='.$val['id'].'"><input type="button" class="btn btn-danger" value="Delete"></a> </td> </tr>'; $i++; } $currentPage='news_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="#">News Filtration</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="text-right paddingBtm"><a href="news_management.php"><button class="btn btn-info btn-fill">Back</button></a></div> <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>Posted Date & Time</th> <th>Owner</th> <th style="width: 245px;">Action</th> </thead> <tbody> <?php echo $filter_data; ?> </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>