<?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['pax'])) {
    $paxid = $_REQUEST['pax'];

    $getm = mysqli_query($conn, "SELECT name, surname FROM pax WHERE `paxid` =  $paxid ")or die(mysqli_error($conn));
        $fetm = mysqli_fetch_array($getm);
        $fname = $fetm['name'];
        $surname = $fetm['surname'];
        $name = $fname . " " . $surname;
    $rows = array('name'=>$name);
     
    header("Content-type: application\json");
    echo json_encode($rows);

}