DIDS-Coursework/DIS-COMP4039-CW2-psxrp11-20450011/psxrp11-20450011_InstallationFiles/isAdmin.php

12 lines
249 B
PHP
Raw Permalink Normal View History

<?php
session_start();
header('Content-Type: application/json');
if ($_SESSION["admin"])
{
echo json_encode(array("message" => "ok", "admin" => $_SESSION["admin"]));
}
else
{
echo json_encode(array("message" => "not logged in as admin"));
}