حَدَّثَنَا هَارُونُ بْنُ إِسْحَاقَ، حَدَّثَنَا عَبْدُ الرَّحْمَنِ الْمُحَارِبِيُّ، عَنْ إِسْمَاعِيلَ بْنِ مُسْلِمٍ، عَنِ الْحَسَنِ، وَقَتَادَةَ، عَنْ أَنَسِ بْنِ مَالِكٍ، قَالَ كَانَ النَّبِيُّ ـ صلى الله عليه وسلم ـ إِذَا خَرَجَ مِنَ الْخَلاَءِ قَالَ ‏"‏ الْحَمْدُ لِلَّهِ الَّذِي أَذْهَبَ عَنِّي الأَذَى وَعَافَانِي ‏"‏ ‏.‏

It was narrated that Anas bin Malik said: "Whenever the Prophet exited the toilet, he would say: 'Al-hamdu lillahilladhi adhhaba 'annial-adha wa 'afani (Praise is to Allah Who has relieved me of impurity and given me good health).'" Translation Not Available

Book Ref: Sunan Ibn Majah Book 1 Hadith 301
Web Ref:  Sunan Ibn Majah Vol 1 Book 1 Hadith 301