It is narrated from Abdullah bin Umar (may Allah be pleased with them both) that he said: "Whoever has a nosebleed, or experiences madhiy (pre-seminal fluid), or vomits, should go back and perform ablution, and then return to the same place and resume the prayer from there."
Hadith Referenceمسند الإمام الشافعي / كتاب الطهارة / 64
Hadith Takhrijأخرجه عبد الرزاق: (3609) عن معمر عن الزهرى به.