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

//    $getm = mysqli_query($conn,"SELECT * FROM `staff` WHERE `code`='$staff'")or die(mysqli_error($conn));
//    $m = mysqli_fetch_array($getm);
    $gsname = mysqli_query($conn,"SELECT `code`,`name`, `salaryph` FROM `staff` WHERE `code` = '$staff'")or die(mysqli_error($conn));
    $stafname = mysqli_fetch_array($gsname);

    Echo $stafname[salaryph];
} else {
    echo "Error";
}