<?php
require("includes/config.php");
ob_start();
require("includes/dbconnect.php");

if (isset($_GET['qyear'])) {
    $qyear = mysqli_real_escape_string($conn, $_GET['qyear']);
    $res   = mysqli_query($conn,
        "SELECT DATE_FORMAT(`startdate`,'%d-%m-%Y') as sdt,
                DATE_FORMAT(`lastdate`,'%d-%m-%Y') as edt
         FROM `compyear`
         WHERE `finyear`='$qyear'"
    );
    if ($res && mysqli_num_rows($res) > 0) {
        $row = mysqli_fetch_array($res);
        echo "<span style='color:#2563eb;font-size:13px;font-weight:600;'>
                From : " . $row['sdt'] . " &nbsp;&nbsp; To : " . $row['edt'] . "
              </span>";
    }
}
?>
