ESH/ambulance_excel.php
2024-10-23 18:28:06 +05:30

40 lines
1.2 KiB
PHP

<?php //include('pdf_header.php');
include('includes/config/config.php');
include('includes/functions.php');
//include('pop_up_top.php');
header('Content-Type: application/force-download');
header('Content-disposition: attachment; filename=excel_ambulance_list.xls');
?>
<table border="1">
<?php
$sql= "SELECT * from ambulance_details_new";
//echo $sql;
$result = mysqli_query($conn,$sql);
?><tr>
<th>SR. NO </th>
<th>Ambulance Name</th>
<th>Ambulance Number</th>
<th>ambulance category</th>
<th>ohc type</th>
</tr><?php
$count=1;
while($rowOfEmployee=mysqli_fetch_array($result)){
?>
<tr>
<td><?php echo $count ?></td>
<td><?php echo $rowOfEmployee['ambulance_name'] ?></td>
<td><?php echo $rowOfEmployee['ambulance_number'] ?></td>
<td><?php echo getTableFieldValue('ambulance_category','ambulance_category','ambulance_category_id',$rowOfEmployee['ambulance_category_id']) ?></td>
<td><?php echo getTableFieldValue('ohc_type','ohc_type_name','ohc_type_id',$rowOfEmployee['ohc_type_id']) ?></td>
</tr>
<?php
$count++;
}
?>
</table>
<?php
//include('pdf_footer.php');
?>