exec("CREATE TABLE IF NOT EXISTS `hero_images` ( `id` int(11) NOT NULL AUTO_INCREMENT, `title` varchar(200) DEFAULT '', `subtitle` varchar(500) DEFAULT '', `image` varchar(255) NOT NULL, `sort_order` int(11) DEFAULT 0, `is_active` tinyint(1) DEFAULT 1, `created_at` timestamp NOT NULL DEFAULT current_timestamp(), PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4"); } catch(Exception $e) {} // Toggle active if (isset($_GET['toggle'])) { $id = (int)$_GET['toggle']; try { $pdo->prepare("UPDATE hero_images SET is_active = 1 - is_active WHERE id=?")->execute([$id]); $msg = "
No hero images added yet. Click Add Hero Image to upload your first slide.