First upload

This commit is contained in:
2024-09-18 16:47:42 +02:00
commit 786dd08043
5614 changed files with 888234 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
<?php
include('Connections/bkngstm.php');
$conn = new mysqli($servername, $username, $password, $dbname);
if ($conn->connect_error) {
die("Connessione fallita: " . $conn->connect_error);
}
// Cancellazione del record
if (isset($_GET['idorder'])) {
$idorder = $_GET['idorder'];
// Utilizzo di prepared statement per evitare SQL injection
$stmt = $conn->prepare("DELETE FROM orderbook WHERE idorderbook = ?");
$stmt->bind_param("i", $idorder);
if ($stmt->execute()) {
echo "Ordine cancellato con successo!";
} else {
echo "Errore nella cancellazione: " . $conn->error;
}
$stmt->close();
// Reindirizzamento alla pagina orderbooklist.php
header("Location: orderbooklist.php");
exit();
} else {
echo "ID ordine non valido.";
// Potresti voler aggiungere un reindirizzamento anche qui, se desideri
}
$conn->close();
?>