<?php
include 'config.php';

$result = $conn->query("SHOW TABLES LIKE 'gallery_%'");
$tables = $result->fetch_all(MYSQLI_ASSOC);

echo json_encode([
    'success' => true,
    'tables' => $tables,
    'count' => count($tables)
]);

$conn->close();
?>
