diff --git a/server/web/update_settings.php b/server/web/update_settings.php index e69de29..a8df8cf 100644 --- a/server/web/update_settings.php +++ b/server/web/update_settings.php @@ -0,0 +1,49 @@ +connect_error) { + die("Connection failed: " . $conn->connect_error); + } + +// Check if the form is submitted +if ($_SERVER["REQUEST_METHOD"] == "POST") { + // Get the form data + $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(); +} +?> + + +
+ + + + + + + +Error updating settings: ' . $conn->error . '
'; + } + ?> +