Primo commit: trasferimento del progetto PPEasy
This commit is contained in:
@@ -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();
|
||||
?>
|
||||
Reference in New Issue
Block a user