24 lines
546 B
PHP
24 lines
546 B
PHP
<?php
|
|
require_once 'connect.php';
|
|
|
|
echo "--- ADMIN TABLE ---\n";
|
|
try {
|
|
$stmt = $con->prepare("SELECT id, name, role FROM admin");
|
|
$stmt->execute();
|
|
$admins = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
|
print_r($admins);
|
|
} catch (Exception $e) {
|
|
echo "Error: " . $e->getMessage() . "\n";
|
|
}
|
|
|
|
echo "\n--- DATABASES ---\n";
|
|
try {
|
|
$stmt = $con->prepare("SHOW DATABASES");
|
|
$stmt->execute();
|
|
$dbs = $stmt->fetchAll(PDO::FETCH_COLUMN);
|
|
print_r($dbs);
|
|
} catch (Exception $e) {
|
|
echo "Error: " . $e->getMessage() . "\n";
|
|
}
|
|
?>
|