<?php
include('dbconnect.php');

// Query to fetch data
$sql = "SELECT  * FROM tbl_lead_import";
$result = $conn->query($sql);

$data = [];
if ($result->num_rows > 0) {
    // Fetch the data and store it in an array
	$sl=1;
    while ($row = $result->fetch_assoc()) {
        $data[] = [$sl,$row['tbl_lead_import_filename'],$row['tbl_lead_import_upload_date'],$row['tbl_lead_import_imported_by'],$row['tbl_lead_import_status'],$row['tbl_lead_import_uploaded'],$row['tbl_lead_import_not_uploaded']];
		$sl++;
    }
}

// Close the database connection
$conn->close();

// Return the data as JSON
echo json_encode($data);



?>
