The Ruling of Remembering a Missed Prayer upon Offering the Due One

What should I do if I go to the Masjid to pray a particular prayer and then I remembered tha ...