25 lines
1.2 KiB
PHP
25 lines
1.2 KiB
PHP
<?php //include('pdf_header.php');
|
|
include('includes/config/config.php');
|
|
//include('pop_up_top.php');
|
|
header('Content-Type: application/force-download');
|
|
header('Content-disposition: attachment; filename=excel_emp_list.xls');
|
|
?>
|
|
<table border="1">
|
|
<?php
|
|
$sql="select id,emp_code,fname,lname,designation_id,father_name,gender,blood_group,primary_phone from employee";
|
|
//echo $sql;
|
|
$result = mysqli_query($conn,$sql);
|
|
//echo $result;
|
|
?><tr><th> ID</th><th>Code</th><th>First Name</th><th>Last Name</th><th>Designation</th><th>Father Name</th><th>Gender</th><th>Blood Group</th><th>Primary phone</th></tr><?php
|
|
while($rowOfEmployee=mysqli_fetch_array($result)){
|
|
|
|
?><tr><td><?php echo $rowOfEmployee['id']?></td><td><?php echo $rowOfEmployee['emp_code']?></td><td><?php echo $rowOfEmployee['fname']?></td><td><?php echo $rowOfEmployee['lname']?></td>
|
|
<td><?php echo $rowOfEmployee['designation_id']?></td><td><?php echo $rowOfEmployee['father_name']?></td><td><?php echo $rowOfEmployee['gender']?></td>
|
|
<td><?php echo $rowOfEmployee['blood_group']?></td><td><?php echo $rowOfEmployee['primary_phone']?></td> </tr><?php
|
|
|
|
}
|
|
?>
|
|
</table>
|
|
<?php
|
|
//include('pdf_footer.php');
|
|
?>
|