Movies within movies by Egantx7

Question 11

This is another case where the real and film-within-the-film share the same title. The fictional film sees playwright Henry travel to Egypt where he and his friends meet archaeologist Tom Baxter. Baxter notices the same sad woman named Cecillia watching the film many times, and enters the real world to meet her. Eventually Gil Shepherd, the actor who plays Baxter arrives to coax him back into the movie by winning Cecillia's heart from Baxter, only to abandon her once Baxter leaps back onto the screen, saving his career. Jeff Daniels replaced Michael Keaton as the Baxter/Shepherd character. Identify this 1985 fantasy film which would not be the first time that Mia Farrow (who played Cecillia) would be jilted by the film's director.

The Purple Rose of Cairo