Supplication when seeing a bad dream:
The righteous dream is from Allah and the bad dream is from the devil, so if anyone sees something which pleases him then he should only relate it to one whom he loves…
أَعُوذُ بِاللَّهِ مِنَ الشَّيْطَانِ الرَّجِيمِ
Summary of what to do upon having a bad dream:
1. Spit on your left three times. (Spit: A form of spitting comprising mainly of air with little spittle)
2. Seek refuge in Allah from satan and the evil of what you saw (Three times).
3. Do not relate it to anyone.
4. Turn and sleep on the opposite side to which you were sleeping on previously.
5. Get up and pray if you so desire.