did he play any role in chocolate factory movie?
Yes, as Charlie Bucket.
Peter Ostrum
Peter Gardner Ostrum (; born November 1, 1957) is an American veterinarian and former child actor whose only film role was as Charlie Bucket in the 1971 motion picture "Willy Wonka & the Chocolate Factory". 

what happened to charlie from the chocolate factory After finding a Golden Ticket in a chocolate bar, he visits Willy Wonka's chocolate factory along with four other children from around the world. who is peter ostrum? An American veterinarian and former child actor.
wiki:20186713
Peter Ostrum [SEP] Introduction
Ostrum became interested in horses when he returned from shooting "Willy Wonka", and was particularly influenced by the veterinarian that tended to them. Receiving his Doctorate of Veterinary Medicine from Cornell University College of Veterinary Medicine in 1984, Ostrum practiced and lived in Lowville, New York with his wife Loretta (), and two children: son, Leif, and daughter, Helenka.