While a man was offering Salah (Prayer), a child came and urinated in the place of his prostration
before the last prostration. What should he do if he prostrated on the impure place knowingly? What should he do, if he is exposed to the same situation again?
If the situation is as you mentioned, his Salah is invalid, if the person prostrates on the impure place knowingly. He should have avoided the place of Najasah, if he wanted to prostrate.May Allah grant us success. May peace and blessings be upon our Prophet Muhammad, his family, and Companions.