Initial commit with updated Auth and media ignored
This commit is contained in:
17
ride/helpCenter/delete.php
Normal file
17
ride/helpCenter/delete.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?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");
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user