Ruling 1093
If a person forgets the salaam of the prayer and remembers it after the form of the prayer has broken up, or if he has intentionally or inadvertently done something that would invalidate his prayer, such as turning his back to qibla, then his prayer is valid.


