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');
|
|
header('Content-Type: application/force-download');
|
|
header('Content-disposition: attachment; filename=excel_user.xls');
|
|
?>
|
|
<table border="1">
|
|
<?php
|
|
$sql="select user_id,user_name,email,role_id,status from tbl_users";
|
|
$sql1="select role_name from role_master";
|
|
$result1 = mysqli_query($conn,$sql1);
|
|
$rw=mysqli_fetch_array($result1);
|
|
$result = mysqli_query($conn,$sql);
|
|
|
|
?><tr><th>User ID</th><th>User</th><th>Email</th><th>User Role</th><th>Status</th></tr><?php
|
|
while($rowOfEmployee=mysqli_fetch_array($result)){
|
|
if($rowOfEmployee['status']=='1'){
|
|
$rowOfEmployee['status']="Active";
|
|
}else{
|
|
$rowOfEmployee['status']="Inactive";
|
|
}
|
|
?><tr><td><?php echo $rowOfEmployee['user_id']?></td><td><?php echo $rowOfEmployee['user_name']?></td>
|
|
<td><?php echo $rowOfEmployee['email']?></td><td><?php echo $rw['role_name']?></td><td><?php echo $rowOfEmployee['status']?></td></tr><?php
|
|
|
|
}
|
|
?>
|
|
</table>
|
|
<?php
|
|
//include('pdf_footer.php');
|
|
?>
|