no, if the airline catches you doing that, they may punish you by closing your frequent flyer account and you will lose all your miles. In addition, who ever you sold the "miles" or "ticket" to will be out of luck as well as the airline will not honor that ticket. However, i dont believe its illegal and I am sure that it happens from time to time as the airlines do allow you to book for someone else. Personally, I wouldnt do it, and risk losing it all, however, if it was a close relative, I may help them out and they can compensate me without the airlines finding out.