<?php

ini_set('display_errors', 1);
error_reporting(E_ERROR);

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['state'])) {
    $state = $_REQUEST['state'];
    $getm = mysqli_query($conn, "SELECT stcode, name FROM `state` WHERE `name`='$state'") or die(mysqli_error($conn));
    $m = mysqli_fetch_array($getm);
    $ctr = 0;
    echo $m['stcode'];
}
