<?php

require("includes/check_auth_user.php");
require("includes/dbconnect.php");
include ('includes/function.php');
$zdb = $_SESSION["zdbyear_" . $dbname];
mysqli_select_db($conn,$zdb);
$admin = $_SESSION["admin_" . $dbname];

if (isset($_REQUEST["vouchdt"])) {
    $vouchdt = $_REQUEST["vouchdt"];

    $gattend = mysqli_query($conn,"SELECT DATE_FORMAT(`vouchdt`, '%d-%m-%Y') as mydt FROM `attend` WHERE `vouchdt`='$vouchdt'")or die(mysqli_error($conn));
    $mctr = mysqli_num_rows($gattend);
    echo $mctr++;
} else {
    echo "ERROR";
}
?>