first commit

This commit is contained in:
2025-09-01 15:06:58 +02:00
commit d8b89fc4fe
5702 changed files with 1021992 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();
?>