Initial commit
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
session_start();
|
||||
header('Content-Type: application/json');
|
||||
|
||||
require_once 'db_config.php';
|
||||
|
||||
$result = $conn->query("SELECT id, username, nama_lengkap, role, created_at FROM users ORDER BY created_at DESC");
|
||||
$users = [];
|
||||
while ($row = $result->fetch_assoc()) {
|
||||
$users[] = $row;
|
||||
}
|
||||
|
||||
echo json_encode($users);
|
||||
$conn->close();
|
||||
?>
|
||||
Reference in New Issue
Block a user