It was narrated that Anas bin Malik said: "Whenever the Messenger of Allah entered the toilet, he would say: 'A'udhu Billahi minal-khubthi wa'l-khaba'ith (I seek refuge with Allah from male and female devils)'."
This hadith also reminds us of the importance of seeking refuge with Allah at all times, not just when entering a toilet but also during other activities throughout our day. We must always remember to ask for His protection and guidance so that He can help protect us from any harm or danger that may come our way.