<?php
header("Content-Type: application/json");
include '../connection.php';

$sql = "SELECT userid, fname, lname FROM tblcred WHERE usertype IN (1, 2)";
$result = $conn->query($sql);
$employees = [];

while ($row = $result->fetch_assoc()) {
    $employees[] = $row;
}

echo json_encode($employees);
?>
