<?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["grpcode"])) {
    $itemgrp = $_REQUEST["grpcode"];

    $getm = mysqli_query($conn, "SELECT * FROM `itemgrp` WHERE `grpcode`='$itemgrp'")or die(mysqli_error($conn));
    $fm = mysqli_num_rows($getm);

    if ($fm > 0) {
        echo $fm;
    } else {
        echo "";
    }
}