<?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];

$partyname = $_REQUEST["partyname"];
$partycond = "and `name`='$partyname'";

$getparty = mysqli_query($conn,"SELECT `accode` FROM `accmast` WHERE `accode`!='' $partycond")or die(mysqli_error($conn));
$fparty = mysqli_fetch_array($getparty);
$maccode = json_encode($fparty);
echo $maccode;
