Valves with flanged connections