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

28 lines
1.4 KiB
PHP

<?php
$sql = "SELECT * from applicant";
$result = @mysqli_query($conn,$sql);
$columnHeader = "Sr NO" . "\t" . "Name of Unit" . "\t" . "Name of Applicant" . "\t"."Guidance Name"."\t"."Product Name"."\t"."Product Code"."\t"."Applicant Verification"."\t"."Date of Unit Establishment"."\t"."Area of Establishment"."\t"."Age of building"."\t"."Protection Act"."\t"."Sufficient Space"."\t"."Building Bye Laws"."\t"."Article Verification"."\t"."Address of Premises"."\t"."Telephone no"."\t"."Email Id"."\t"."Residential Address"."\t"."Telephone no"."\t"."Email Id"."\t"."Proof of Legal Occupancy"."\t"."Identity Residence Proof"."\t"."Sketch Map"."\t"."Proof of Payment"."\t"."Proof Date Commencement"."\t"."Structural Safety Certificate"."\t"."Pollution noc"."\t"."Fire Safety Certificate"."\t"."Name of Partners";
while($row = @mysqli_fetch_array($result))
{
$applicantId = $row['id'];
$sql1 = "SELECT * FROM applicant_address WHERE applicant_id=$applicantId";
$result1 = @mysqli_query($conn,$sql1);
while($row1 = @mysqli_fetch_array($result1))
{
}
$sql2 = "SELECT * FROM applicant_check_list_document WHERE applicant_id=$applicantId";
$result2 = @mysqli_query($conn,$sql2);
while($row2 = @mysqli_fetch_array($result2))
{
}
}
header("Content-type: application/octet-stream");
header("Content-Disposition: attachment; filename=Reoprt.xls");
header("Pragma: no-cache");
header("Expires: 0");
echo ucwords($columnHeader);
?>