Shitting and peeing is something that human beings do every time. Islam give directions to its adherents in it as something that being preferred to do. The prophets Muhammad (pbuh) said as narrated by Muslim from Saman al-Farisi : “Your Prophet had taught you anything even the way to shitting and peeing (Muslim: hadith no 262)
What to say when entering toilet
The prophet said as narrated by Bukhari and Muslim that it is preferable to those who enter toilet to say: “Allahumma inni a’udzubiika minal khubuutsi wal khabaaits” (O Allah I asked You that I am being protected from anything bad)” (Bukhari no 142 and Muslim no 375). This because toilet is consider unhealthy and dirty, placed by germs, virus, and others that may harm human being that makes us properly asked for Allah’s protection. When someone forget then he may spell it in his heart while he is shitting or peeing (Fathool Baari book 1 page 307)
Step that is preferred when entering toilet
The prophet preferred to prelude his right handside than the left in every conditions, but when entering tolilet it is peferred to prelude with his left step (Ibnu Daqiqil in Syarah ‘Umdatil Ahkam book 1 page 44). The same opnion was argued by Imam an-Nawawi in Syarah Shahih Muslim book 3 page 160.
Protecting self from the sight of others
Hadith narrated by Muslim from Abdullah Ibn Ja’far said that the prophet likes to make something that cover him (such as wall) and tree to cover himself when shitting or peeing (Muslim no 342)