30 lines
1.0 KiB
PHP
30 lines
1.0 KiB
PHP
|
<?php //include('pdf_header.php');
|
||
|
include('includes/config/config.php');
|
||
|
//include('pop_up_top.php');
|
||
|
include('includes/functions.php');
|
||
|
header('Content-Type: application/force-download');
|
||
|
header('Content-disposition: attachment; filename=excel_subcategory.xls');
|
||
|
?>
|
||
|
<table border="1">
|
||
|
<?php
|
||
|
$sql="select sub_cat_id,sub_cat_name,status,remarks,cat_id from sub_category";
|
||
|
//echo $sql;
|
||
|
$result = mysqli_query($conn,$sql);
|
||
|
//echo $result;
|
||
|
?><tr><th>Category Name</th><th>Sub Category Name</th><th>Remarks</th><th>Status</th></tr><?php
|
||
|
while($rowOfEmployee=mysqli_fetch_array($result)){
|
||
|
if($rowOfEmployee['status']=='1'){
|
||
|
$rowOfEmployee['status']="Active";
|
||
|
}else{
|
||
|
$rowOfEmployee['status']="Inactive";
|
||
|
}
|
||
|
$cat_name=getTableFieldValue('tbl_categories',' cat_name',' cat_id',"'". $rowOfEmployee['cat_id']."'");
|
||
|
?><tr><td><?php echo $cat_name?></td><td><?php echo $rowOfEmployee['sub_cat_name']?></td><td><?php echo $rowOfEmployee['remarks']?></td><td><?php echo $rowOfEmployee['status']?></td>
|
||
|
</tr><?php
|
||
|
|
||
|
}
|
||
|
?>
|
||
|
</table>
|
||
|
<?php
|
||
|
//include('pdf_footer.php');
|
||
|
?>
|