Plot Hole
In the film, the four are stopped from going into space when NASA is formed as a civilian agency. It's implied that because chimps are chosen to make the first space flights, ahead of humans, they're not allowed togo into space.
However, in the years after NASA was officially formed, they would have been totally free to volunteer to become astronauts at a later time, when future astronaut "classes" were picked.
In 1962, when the second group of astronauts were selected (the so-called "Gemini Nine" who followed in the footsteps of the "Mercury Seven"), the application process was open to any military or civilian test pilots who met the basic requirements. At least two of them -Jim Lovell and Pete Conrad- had been rejected for the Mercury selection. In 1963, another class was added where the applicant didn't have to have test pilot credentials, but could have a graduate degree instead.
So, even if the four had not been allowed to become Mercury astronauts in 1959, they would have been completely free to volunteer for future astronaut selections.