<?php

require_once __DIR__ . '/../../connect.php';

$helpID = filterRequest("id");

$sql = "DELETE FROM `helpCenter` WHERE `id` = :id";
$stmt = $con->prepare($sql);
$stmt->bindParam(':id', $helpID, PDO::PARAM_INT);
$stmt->execute();

if ($stmt->rowCount() > 0) {
    jsonSuccess(null, "Help question deleted successfully");
} else {
    jsonError("Failed to delete help question");
}
?>