added production
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
include('include/headscript.php');
|
||||
header('Content-Type: application/json');
|
||||
$db = DBHandlerSelect::getInstance();
|
||||
$pdo = $db->getConnection();
|
||||
|
||||
if (empty($_POST['id'])) {
|
||||
echo json_encode(['success' => false, 'msg' => 'ID mancante']);
|
||||
exit;
|
||||
}
|
||||
|
||||
try {
|
||||
$stmt = $pdo->prepare("DELETE FROM productiondata WHERE id = :id");
|
||||
$stmt->execute(['id' => $_POST['id']]);
|
||||
echo json_encode(['success' => true]);
|
||||
} catch (Exception $e) {
|
||||
echo json_encode(['success' => false, 'msg' => $e->getMessage()]);
|
||||
}
|
||||
Reference in New Issue
Block a user