<?php 
require("includes/check_auth_user.php");
require("includes/dbconnect.php");
include ('includes/function.php');
$zdb = $_SESSION["zdbyear_$dbname"];
mysqli_select_db($conn, $zdb);
if ($_REQUEST["code"]) {
    $code = $_REQUEST["code"];
    if ($_REQUEST["para"] == "padd1") {
        $getcons1 = mysqli_query($conn, "SELECT `add1` FROM `accmast` WHERE accode = '$code'") or die(mysqli_error($conn));
        $pcons1 = mysqli_fetch_object($getcons1);
        echo $pcons1->add1;
    } if ($_REQUEST["para"] == "padd2") {
        $getcons2 = mysqli_query($conn, "SELECT `add2` FROM `accmast` WHERE accode = '$code'") or die(mysqli_error($conn));
        $pcons2 = mysqli_fetch_object($getcons2);
        echo $pcons2->add2;
    }
} 
?> 