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'"; } ?>
query($update_query) === TRUE) { header("Location: /"); $conn->close(); exit(); } else { echo '

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

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