0) { // UPDATE $sql->set( "UPDATE connections SET port_a_type = ?, port_a_id = ?, port_b_type = ?, port_b_id = ?, vlan_config = ?, comment = ? WHERE id = ?", "siisisi", [$portAType, $portAId, $portBType, $portBId, $vlanJson, $comment, $connId] ); } else { // INSERT $sql->set( "INSERT INTO connections (port_a_type, port_a_id, port_b_type, port_b_id, vlan_config, comment) VALUES (?, ?, ?, ?, ?, ?)", "siisis", [$portAType, $portAId, $portBType, $portBId, $vlanJson, $comment] ); } $_SESSION['success'] = "Verbindung gespeichert"; // ========================= // Redirect // ========================= header('Location: ?module=connections&action=list'); exit;