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(); } ?>

Update Settings

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

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

'; } ?>