diff --git a/admin/index.php b/admin/index.php new file mode 100644 index 0000000..c8aea29 --- /dev/null +++ b/admin/index.php @@ -0,0 +1,66 @@ +prepare('SELECT id, username, email, role, created_at FROM users ORDER BY created_at DESC'); + $p_users->execute(); + $users = $p_users->fetchAll(PDO::FETCH_ASSOC); +} catch (PDOException $e) { + // For now, we'll just die on error. In a real app, log this. + die("Error fetching users: " . $e->getMessage()); +} + +$pageTitle = 'Admin Dashboard'; +include '../includes/header.php'; +?> + +
Welcome, !
+ +Here you can view all registered users.
+ +| ID | +Username | +Role | +Registered At | +|
|---|---|---|---|---|
| No users found. | +||||
| + | + | + | + | + |