<?php
require_once 'includes/db_connection.php';

try {
    $stmt = $pdo->query("SELECT id, name, slug FROM collections");
    $collections = $stmt->fetchAll(PDO::FETCH_ASSOC);
    echo "ID\tSlug\t\tName\n";
    foreach ($collections as $c) {
        echo $c['id'] . "\t" . $c['slug'] . "\t\t" . $c['name'] . "\n";
    }
} catch (PDOException $e) {
    echo "Error: " . $e->getMessage();
}
?>
