<!DOCTYPE html>
<html>
<body>

<?php
$servername = "localhost";
$username = "oscotech_adUser";
$password = "oscotech_adPass";
$dbname = "oscotech_admission";

// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
}

$sql = "SELECT id, department, formno FROM admission_list where admitted_date='2020-12-26'";
$result = $conn->query($sql);

if ($result->num_rows > 0) {
    // output data of each row
    while($row = $result->fetch_assoc()) {
        echo "<br> id: ". $row["id"]. " - Name: ". $row["department"]. " " . $row["formno"] . "<br>";
    }
} else {
    echo "0 results";
}

$conn->close();
?>

</body>
</html>