Would it be possible to answer this question instead of redirecting me to another one? After praying the ‘Ishaa’ prayer, I made the intention to pray two units of Tahajjud and one unit of Witr. After saying Allahu Akbar, one of two things happened: whilst praying, I forgot whether I was praying the Witr or the Tahajjud, or I did not make an intention for the prayer which I was praying, I just said Allahu Akbar, so I broke off my prayer and started anew; is this wrong? Should I have formed the intention inside the prayer in either of these two possible situations?
All perfect praise be to Allah, the Lord of the worlds. I testify that there is none worthy of worship except Allah and that Muhammad is His slave and Messenger.
The Witr prayer is one of the specific supererogatory acts of worship for which one has to make the intention before starting it.
If you doubt during the prayer whether or not you have made the intention for Witr, then in principle you did not make the intention.
Therefore, you should interrupt the prayer, as you did, and then start the payer while intending it as Witr. Or you may complete the prayer with the intention of making it a general supererogatory prayer, and then you pray the Witr prayer after it.
Ar-Rawdh reads, “If he doubts which intention he has made or doubts whether or not he has made the Takbeerat-ul-Ihraam (starting Takbeer), then he should cut off the prayer and start anew.”
All this of course applies if you are not affected with Waswasah (obsessive doubts), because if that is the case, then you must ignore these doubts, neglect them, and not pay any attention to them.
Allah knows best.
You can search for fatwa through many choices