<?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"] == "site2") {
        $getcons1 = mysqli_query($conn, "SELECT `name2` FROM `site` WHERE code = '$code'") or die(mysqli_error($conn));
        $pcons1 = mysqli_fetch_object($getcons1);
        echo $pcons1->name2;
    }
} 
?> 