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

42 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 client_location";
//echo $sql;
$result = mysqli_query($conn,$sql);
?><tr style="background-color: #eeeee;">
<td align="left" width="2%">SR</td>
<td>CLIENT NAME</td>
<td>CLIENT LOCATION</td>
<td>CITY</td>
<td>STATE</td>
<td>CONTACT</td>
<td>EMAIL</td>
</tr><?php
$count=1;
while($row1=mysqli_fetch_array($result)){
?><tr>
<td><?php echo $count ?></td>
<td><?php echo getFieldFromTable('client_name', 'client_master', 'id', $row1['client_id']) ?></td>
<td><?php echo $row1['client_location'] ?></td>
<td><?php echo getTableFieldValue('citys', 'city', 'city_id', $row1['client_city']) ?></td>
<td><?php echo getTableFieldValue('state_form_master', 'state_code', 'id', $row1['client_state']) ?></td>
<td><?php echo $row1['client_contact'] ?></td>
<td><?php echo $row1['client_email'] ?></td>
</tr><?php
$count++;
}
?>
</table>
<?php
//include('pdf_footer.php');
?>