1 - It is recommended for the person who wants to enter the toilet to say:
بِسْمِ الله ) اللَّهُمَّ إِنِّي أَعُوْذُ بِكَ مِنَ الْخُبُثِ وَالْخَبَائِثِ)
(Bismillaah),
(Allaahummaa innee a`oodhu bika minal-khubuthi wal-khabaa·ith)
(With the name of Allaah),
(O Allaah! I seek Your refuge from male and female devils).
This is because of the hadeeth of `Alee -radiyallaahu `anhu- that the Prophet (صلّى الله عليه وسلّم ) said:
<<The screen between the jinn and the private-parts of the descendants of Aadam, when one of you enters the toilet, is that he says:‘Bismillaah’ (with the name of Allaah).>> [1.1]
And because of the hadeeth of Anas -radiyallaahu `anhu- who said: “When Allaah’s Messenger (صلّى الله عليه وسلّم ) went to the toilet he used to say:
اللَّهُمَّ إِنِّي أَعُوْذُ بِكَ مِنَ الْخُبُثِ وَالْخَبَائِثِ
‘Allaahummaa innee a`oodhu bika minal-khubuthi wal-khabaa·ith’ (O Allaah! I seek Your refuge from male and female devils).”  [1.2]
2 - And it is recommended that when he departs he says:: (Ghufraanaka): (I seek Your forgiveness), because of the hadeeth of Aa·ishah -radiyallaahu `anhaa- who said: “When the Prophet (صلّى الله عليه وسلّم ) came away from the toilet he would say: << Ghufraanaka>> (I seek Your forgiveness).” 1.3
3 - And it is recommended that he should enter with his left-foot first, and depart with the right-foot first.
This is because the right-side is used for noble actions, and the left-side for actions which are not noble actions; and there are reports which indicate this generally. [1.4]
4 - And if he is in an open place, then it is recommended for him to move far enough away so that he is not seen:
From Jaabir -radiyallaahu `anhu- who said: “We went out along with Allaah’s Messenger (صلّى الله عليه وسلّم ) on a journey, and Allaah’s Messenger (صلّى الله عليه وسلّم ) would not go to the toilet until he had gone far enough so that he would not be seen.” [1.5]
5 - And it is recommended that he does not raise his garment until he is close to the ground:
From Ibn `Umar -radiyallaahu `anhumaa- : “That when the Prophet (صلّى الله عليه وسلّم ) wanted to relieve himself he would not raise his garment until he was close to the ground.” [2.1]
6 - And it is not permissible to face or to have ones back towards the qiblah, whether in the open desert or within a building:
From Aboo Ayyoob al-Ansaaree -radiyallaahu `anhu- from the Prophet (صلّى الله عليه وسلّم ) who said:
When you go to the toilet, then do not face the qiblah and do not have your back towards it, but rather turn to the east or to the west.” [2.2]
Aboo Ayyoob said: “So we came to Shaam, and we found toilets which had been built facing towards the Ka`bah. So we would turn aside from it, and we would ask for the forgiveness of Allaah -the Most High.” [2.3]
7 - And it is forbidden to go to the toilet upon the path-way of the people, and in the places where they take shade:
From Aboo Hurayrah that the Prophet (صلّى الله عليه وسلّم ) said:
<<Beware of the two things which bring about curses.>> They said: “And what are the two things which bring about curses, O Messenger of Allaah?” He said: <<The person who goes to the toilet upon the path-way of the people, or where they take shade.>>2.4
8 - And it is disliked to urinate in the place where he takes a bath: From Humayd al-Himyaree who said: I met a man who had accompanied the Prophet (صلّى الله عليه وسلّم ) just as Aboo Hurayrah accompanied him, [2.5] who said: “Allaah’s Messenger (صلّى الله عليه وسلّم ) forbade that one of us should comb his hair every day, and that he should urinate in the place where he takes a bath.”  [2.6]
9 - And it is forbidden to urinate in standing water:
From Jaabir: from the Prophet (صلّى الله عليه وسلّم ) that he forbade urinating in standing water. [3.1]
10 - And it is permissible to urinate standing, but sitting is better:
From Hudhayfah -radiyallaahu `anhu-: that the Prophet (صلّى الله عليه وسلّم ) came to the rubbish dump of a people, and he urinated whilst standing. So I moved away, so he said: <<Draw near.>> So I drew close to him, until I stood at his heels. So he performed wudoo·, and wiped over his leather socks. [3.2]
And we said that sitting is better because that was his usual practice, to such an extent that `Aa·ishah -radiyallaahu `anhaa- said: “Whoever narrates to you that Allaah’s Messenger (صلّى الله عليه وسلّم ) urinated whilst standing then do not believe him. He had not used to urinate except whilst sitting.” [3.3]
And this saying of hers does not negate what occurs from Hudhayfah, since she informed about what she had seen, and Hudhayfah informed about what he had seen; and, as is known, the one who affirms is given precedence over the one who negates, since he has additional knowledge with him.
11 - And it is obligatory to keep oneself clean of urine:
So from Ibn `Abbaas -radiyallaahu `anhumaa- : that the Prophet (صلّى الله عليه وسلّم ) passed by two graves, and said:
<<They are being punished, and they are not being punished for something serious. As for one of them, then he had not used to keep himself clean of his urine; and as for the other, then he used to go between the people with reports to cause trouble (nameemah).” [3.4]
12-And he should not hold his penis with his right hand whilst he is urinating, nor clean himself with it:
From Qataadah -radiyallaahu `anhu- who said: Allaah’s Messenger (صلّى الله عليه وسلّم ) said:
When one of you urinates, let him not hold his penis with his right hand; and let him not clean himself with his right hand.” [4.1]
13 - And it is permissible to clean oneself with water, or with stones-or with whatever is like them, and water is better:
From Anas -radiyallaahu `anhu- who said: “Allaah’s Messenger (صلّى الله عليه وسلّم ) used to enter the toilet, and I and a boy of similar age to me used to carry a pot of water and a spear. So he would clean himself with the water.” [4.2]
And from `Aa·ishah -radiyallaahu `anhaa- that Allaah’s Messenger (صلّى الله عليه وسلّم ) said: <<When one of you goes to the toilet then let him take three stones along with him, and let him clean himself with them, since they will suffice him.>>  [4.3]
14 - And it is not permissible to suffice with less than three stones:
From Salmaan al-Faarisee -radiyallaahu `anhu- that it was said to him: ‘Your Prophet (صلّى الله عليه وسلّم ) has taught you everything, even how to use the toilet!’ So he said: “Yes indeed! He forbade us from facing the qiblah with excrement or urine; and that we should clean ourselves with the right hand, and that we should clean ourselves with less than three stones; and that we should clean ourselves with a piece of animal dung or with a bone.” [4.4]
15 - And it is not permissible to clean oneself with a bone, or with a piece of dung: From Jaabir -radiyallaahu `anhu- who said: “The Prophet (صلّى الله عليه وسلّم ) forbade that a person should wipe himself clean with a bone or a piece of animal dung.” [4.5]
Footnotes :
[1.1] Saheeh: Saheehul-Jaami` (3611); at-Tirmidhee (2/59/606)-and this is his wording; Ibn Maajah (1/109/297)…
[1.2] Agreed upon: al-Bukhaaree (1/242/142), Muslim (1/283/375), Aboo Daawood (1/21/4), Ibn Maajah (1/109/298), at-Tirmidhee (1/76), an-Nasaa·ee (1/20)
[1.3] Saheeh: Saheehul-Jaami` (4714); Aboo Daawood (1/52/30), at-Tirmidhee (1/7/7), Ibn Maajah (1/110/300).
[1.4] ‘as-Saylul-Jarraar’ (1/64). Shaikh al-Albaanee said in his notes upon ‘Ta·seesul-Ahkaam’ (1/34), concerning entering the toilet with the justify-foot: “I do not know anything from that in the Sunnah” (transl.).
[1.5] Saheeh: Saheeh Ibn Maajah (268); Ibn Maajah (1/121/335), Aboo Daawood (1/19/2) -with its like.
[2.1] Saheeh: Saheehul-Jaami` (4652); Aboo Daawood (1/31/14), at-Tirmidhee (1/11/14) as a hadeeth of Anas.
[2.2] Saheeh: Mukhtasar Muslim (109), [Muslim (no.264)], Saheeh Abee Daawood (7).
[2.3] Agreed upon: al-Bukhaaree (1/498/394), Muslim (1/224/264), at-Tirmidhee (1/8/8).
[2.4] Saheeh: Saheehul-Jaami` (110); Aboo Daawood (1/47/25), Muslim (1/226/269)…
[2.5] The narration of an-Nasaa·ee contains the additional wording “for four years.” (transl.).
[2.6] Saheeh: Saheehun-Nasaa·ee (232); an-Nasaa·ee (1/130), Aboo Daawood (1/50/28).
[3.1] Saheeh: Saheehul-Jaami` (6814); Muslim (1/235/281), an-Nasaa·ee (1/34).
[3.2] Muslim (1/228/273), at-Tirmidhee (1/11/13), al-Bukhaaree (1/329/225), an-Nasaa·ee (1/19), Aboo Daawood (1/44/23), Ibn Maajah (1/111/305).
[3.3] Saheeh: Saheehun-Nasaa·ee (29), an-Nasaa.ee (1/26), at-Tirmidhee (1/10/12)….
[3.4] Agreed upon: al-Bukhaaree (1/317/216), Muslim (1/240/292), at-Tirmidhee (1/47/70), Aboo Daawood (1/40/20), an-Nasaa·ee (1/28).
[4.1] Saheeh: Saheeh Ibn Maajah (250); Ibn Maajah (1/113/310) -this is his wording; and it was reported by: al-Bukhaaree (1/254/154), Muslim (1/225/267), Aboo Daawood (1/53/31), at-Tirmidhee (1/12/15), an-Nasaa·ee (1/25) -in longer form, and in abridged form.
[4.2] Agreed upon: al-Bukhaaree (1/252/152), Muslim (1/227/271), an-Nasaa·ee (1/42)- and he does not have a mention of the spear. An-Nawawee said: “The Prophet (صلّى الله عليه وسلّم ) used to take it (i.e. the spear) along with him, because when he had performed wudoo· he would pray. So he needed to erect it in front of him, so that it would be a barrier which he could pray towards.” (transl.)
[4.3] Saheeh:Saheehun-Nasaa·ee; an-Nasaa·ee (1/42), Aboo Daawood (1/61/40)
[4.4] Saheeh: Saheeh Ibn Maajah (255); Muslim (1/223/262), at-Tirmidhee (1/13/16), Aboo Daawood (1/24/7), Ibn Maajah (1/115/316), an-Nasaa·ee (1/38)
[4.5] Saheeh: Saheehul-Jaami` (6827); Muslim (1/224/263), Aboo Daawood (1/60/38)
Source : Al-Wajeez, The Book Of Purification  –  Abdul-`Azeem ibn Badawee al-Khalafee, Translated by Abu Talhah Dawood Burbank . An excellent book on the rules and regulations of various acts of worship, with evidences from the Book and Sunnah. This chapter deals with water and aspects of purification, wudhoo, ghusl, the toilet etc