Primo commit: trasferimento del progetto PPEasy

This commit is contained in:
2024-09-18 10:30:50 +02:00
commit eb475f257e
4233 changed files with 1043848 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
<?php
header('Content-Type: application/json');
?>
<?php require_once '../Connections/cmctrfdb.php'; ?>
<?php require_once '../webassist/mysqli/rsobj.php'; ?>
<?php
$conn = new mysqli($servername, $username, $password, $dbname);
if (isset($_POST['id']))
$id = $_POST['id'];
// Preparazione della query per prevenire SQL Injection
$stmt = $conn->prepare("DELETE FROM contacts_td WHERE idcontactstd = ?");
$stmt->bind_param("i", $id);
if ($stmt->execute()) {
echo json_encode(['success' => true]);
} else {
echo json_encode(['success' => false]);
}
$stmt->close();
?>