<?php include('includes/config/config.php'); header('Content-Type: application/force-download'); header('Content-disposition: attachment; filename=excel_health_audit_report.xls'); ?> <html> <link href="includes/css-js/admin.css" rel="stylesheet" type="text/css" /> <body> <table border="1" style="text-aling: center;"> <?php $i=1; $sql="SELECT * from health_audit"; //echo $sql; $result = mysqli_query($conn,$sql); //echo $result; ?> <tr bgcolor="#eeeeee"> <th width="10%" ;>SR</th> <th width="10%" ;>AUDIT NAME</th> <th width="10%" ;>AUDIT DETAILS</th> <th width="10%" ;>LOCATION</th> <th width="10%" ;>START DATE TIME</th> <th width="10%" ;>END DATE TIME</th> <th width="10%" ;>AUDITOR NAME</th> <th width="10%" ;>OHC REPRESENTATIVE NAME</th> <th width="10%" ;>REMARKS</th> </tr> <?php while($fetchData=mysqli_fetch_array($result)){?> <tr style="text-align: center;"> <td><?php echo $i ?></td> <td><?php echo $fetchData['audit_name']?></td> <td><?php echo $fetchData['audit_details']?></td> <td><?php echo $fetchData['location']?></td> <td><?php echo $fetchData['start_date_time']?></td> <td><?php echo $fetchData['end_date_time']?></td> <td><?php echo $fetchData['auditor_name']?></td> <td><?php echo $fetchData['representative_name']?></td> <td><?php echo $fetchData['audit_remarks']?></td> </tr> <?php $i++; } ?> </table> </body> </html>