JezK
Edit File: activeusers.php
<?php include('admin_functions.php'); if($_SESSION['username']=='') { echo "<script>location.replace('index.php');</script>" ; } $admin=new adm_functions(); $users = $admin->getAllactive_users(); //print_r($users);exit; $i=1; $usersdata = ''; foreach($users as $k=>$val){ if($val['activestatus']=="1") $status='Active'; else $status="Not active"; $usersdata .=' <tr> <td>'.$i.'</td> <td>'.$val['name'].'</td> <td>'.$val['phonenumber'].'</td> <td>'.$val['postcount'].'</td> <td>'.$val['state'].'<br/>'.$val['district'].'<br/>'.$val['mandal'].'<br/>'.$val['city'].'</td> <td>'.$status.'</td> </tr>'; $i++; } $currentPage='user_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="#">Active Users Details</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="pull-right"><p>Total Users:<?php echo count($users);?></p></div> <div class="content table-responsive table-full-width"> <div align="center"> <a href="user_management.php" class="cutab">All</a> <a href="activeusers.php" class="cutab">Active</a> <a href="inactiveusers.php" class="cutab">Inactive</a> <a href="notverified.php" class="cutab">Not verified</a> <a href="blockedusers.php" class="cutab">Blocked</a></div> <table id="example" class="display table table-striped"> <thead> <th>S.No</th> <th>Username</th> <th>Phone Number</th> <th>No of Postings</th> <th>Address</th> <th>Active Status</th> <!-- <th>Action</th> --> </thead> <tbody> <?php echo $usersdata ;?> </tbody> </table> </div> </div> </div> </div> </div> <?php include"footer.php" ?> <style> .cutab { padding: 9px 15px; background: #0099DD; color: #fff; border-radius: 4px; } .cutab:hover { font-family:arial font-size:20px; color:black; } </style> <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>