JezK
Edit File: student.php
<?php include('app/adminfunctions.php'); $superadmin_obj = new adminFunctions(); $users_data=$superadmin_obj->get_studentdetails(); $usersdata = ''; //echo "<pre>"; //print_r($users_data); //exit; if($users_data){ $i=1; foreach($users_data as $k=>$val){ $staffstatus="<span style='color:#ff0000;'>Inactive</span>"; if($val['status']==1) $staffstatus="Active"; $usersdata .= '<tr> <td>'.$i.'</td> <td>'.$val['name'].'</td> <td >'.$val['dob'].'</td> <td >'.$val['adminno'].'</td> <td>'.$val['telephone'].'</td> <td >'.$val['email'].'</td> <td style="color:#008000;">'.$staffstatus.'</td> <td><a href="studentview.php?id='.$val['id'].'" class="viewbutton"> View </a></td> </tr>'; $i++; } } ?> <?php include 'header.php';?> <div id="content-wrapper"> <div class="container-fluid"> <!-- Breadcrumbs--> <ol class="breadcrumb"> <li class="breadcrumb-item"> <a href="#">Student List</a> </li> <li> </li> </ol> <!-- DataTables Example --> <div class="card mb-3"> <div class="card-body"> <div class="table-responsive"> <table class="table table-bordered" id="dataTable" width="100%" cellspacing="0"> <thead> <tr> <th>S.no</th> <!--<th>Username</th> --> <th>Name</th> <th>DOB</th> <th>Admission No</th> <th>contact</th> <th>email</th> <th>Status</th> <th>Action</th> </tr> </thead> <tbody> <?php echo $usersdata;?> </tbody> </table> </div> </div> </div> </div> <!-- /.container-fluid --> <?php include 'footer.php';?>