0) { // UPDATE $sql->set( "UPDATE racks SET name = ?, floor_id = ?, height_he = ?, comment = ? WHERE id = ?", "siisi", [$name, $floorId, $heightHe, $comment, $rackId] ); } else { // INSERT $sql->set( "INSERT INTO racks (name, floor_id, height_he, comment) VALUES (?, ?, ?, ?)", "siis", [$name, $floorId, $heightHe, $comment] ); } $_SESSION['success'] = "Rack gespeichert"; // ========================= // Redirect // ========================= header('Location: ?module=racks&action=list'); exit;