Initial commit untuk UAS SIG
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
session_start();
|
||||
header('Content-Type: application/json');
|
||||
|
||||
if (isset($_SESSION['user_id'])) {
|
||||
echo json_encode(['status' => 'success', 'username' => $_SESSION['username']]);
|
||||
} else {
|
||||
http_response_code(401);
|
||||
echo json_encode(['status' => 'error', 'message' => 'Unauthorized']);
|
||||
}
|
||||
Reference in New Issue
Block a user