prepare("SELECT * FROM campaigns WHERE slug = ? AND is_active = TRUE"); $stmt->execute([$slug]); $campaign = $stmt->fetch(); if (!$campaign) { die("Campaign not found or inactive."); } // Log view $stmt = $pdo->prepare("INSERT INTO stats (campaign_id, type) VALUES (?, 'view')"); $stmt->execute([$campaign['id']]); ?>
This content is for adults only.