From d1069bb62ced9fa76e1dffddc79d62dc6bd522b8 Mon Sep 17 00:00:00 2001 From: Wisdurm Date: Tue, 28 Oct 2025 10:47:29 +0200 Subject: [PATCH] Poisto nappi --- index.php | 1 + luku.php | 6 ++++++ poista.php | 18 ++++++++++++++++++ 3 files changed, 25 insertions(+) create mode 100644 poista.php diff --git a/index.php b/index.php index 19d775b..e409713 100755 --- a/index.php +++ b/index.php @@ -38,6 +38,7 @@ Status Ruokaraha Muuta + Muokkaus num_rows>0){ echo "" . $row["status"] . ""; echo "" . $row["ruokaraha"] . ""; echo "" . $row["muuta"] . ""; + echo "" . // Poista nappi + "
+ + +
" + . ""; echo ""; } } diff --git a/poista.php b/poista.php new file mode 100644 index 0000000..113b830 --- /dev/null +++ b/poista.php @@ -0,0 +1,18 @@ +query($sql) === TRUE) { + echo "Arvo poistettu onnistuneesti"; +} else { + echo "Virhe poistaessa arvoa: " . $conn->error; +} +$conn->close(); +// Redirect +$newURL = "index.php"; +header('Location: '.$newURL); +die(); +?> -- 2.47.3