connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$year = $_GET['year'] ?? date('Y');
$month = $_GET['month'] ?? date('n');
$sql = "SELECT * FROM submitted WHERE status != 'DELETED' and MONTH(eta) = $month and YEAR(eta) = $year ORDER BY eta ASC;"; // Replace with your table name
$result = $conn->query($sql);
// Check if there are results
if ($result->num_rows > 0) {
// Start HTML table
echo '
';
// Output table headers (assuming column names are known)
$fields = $result->fetch_fields();
foreach ($fields as $field) {
if ($field->name != 'id') {
echo '