"Learning to fly online" is arguably about as useful as learning to drive, play billiard or perform surgery online.
Having said that, why not get a desktop PC sim (MSFS, X-plane, or FlightGear, whichever you prefer), register for a simmers' network (VATSIM or IVAO) and maybe go through some of the offered training sessions? It won't teach anyone how to fly an airplane, but offers a very fun, challenging, and immersive experience as well as some insight into the world of aviation.