prepare("INSERT INTO comments (user_id, content, love_wall_id) VALUES (?, ?, ?)"); $stmt->execute([$user_id, $content, $love_wall_id]); } elseif (isset($_POST['article_id'])) { $article_id = intval($_POST['article_id']); $stmt = $pdo->prepare("INSERT INTO comments (user_id, content, article_id) VALUES (?, ?, ?)"); $stmt->execute([$user_id, $content, $article_id]); } } ?>