From bcd81120e9ade106b93433f3e75a7387314df6cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ebbe=20Ba=C3=9F?= Date: Sat, 17 Feb 2024 02:19:37 +0100 Subject: [PATCH] fixed con close MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ebbe Baß --- server/web/update_settings.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/server/web/update_settings.php b/server/web/update_settings.php index a8df8cf..3134e07 100644 --- a/server/web/update_settings.php +++ b/server/web/update_settings.php @@ -18,10 +18,8 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") { $macAddress = $_POST['macAddress']; $dmxAddress = $_POST['dmxAddress']; $universe = $_POST['universe']; - + $update_query = "UPDATE tubes SET dmx_address = '$dmxAddress', universe = '$universe' WHERE mac_address = '$macAddress'"; - - $conn->close(); } ?> @@ -35,13 +33,14 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
-

Update Settings

query($update_query) === TRUE) { header("Location: ".$_SERVER['SERVER_NAME']."/"); + $conn->close(); exit(); } else { echo '

Error updating settings: ' . $conn->error . '

'; + $conn->close(); } ?>