Praise be to Allah.
Al-Bukhaari narrated in his Saheeh:
‘Imraan ibn Husayn said: “I had haemorrhoids and I asked the Messenger of Allaah (peace and blessings of Allaah be upon him) about that. He said, ‘Pray standing; if you cannot do that, then (pray) sitting; if you cannot do that then (pray) on your side.”(Saheeh al-Bukhaari, 1066).
If you can stand up, then do not sit, unless that is too difficult for you. If you sit because it is too difficult to stand, you will still have the full reward.
Abu Moosa al-Ash’ari reported that the Prophet (peace and blessings of Allaah be upon him) said: “If a person gets sick or travels, he will have the same reward as when he was healthy or not travelling.”(Narrated by al-Bukhaari, 2834).
With regard to rukoo’ and sujood, you do not have to do them because you are not able to do them, since bowing would cause you harm. You should try to lean forward as much as you can for rukoo’ and sujood, making the sujood lower than the rukoo’ by nodding or gesturing. The Prophet (peace and blessings of Allaah be upon him) said: “Put your forehead on the ground if you can, otherwise use nods or gestures, and make your sujood lower than your rukoo’.”Shaykh al-Albaani said: this was narrated by al-Tabaraani, al-Bazzaar, Ibn al-Sammaak in his hadeeth (67/2) and al-Bayhaqi. Its isnaad is saheeh as I explained in al-Saheehah (323). Sifat Salaat al-Nabi (peace and blessings of Allaah be upon him), p. 79.
Ibn Qudaamah said in the text of al-‘Umdah: “If a person is unable to do rukoo’ or sujood, he should indicate them by nods or gestures.”(al-‘Umdah Sharh al-‘Iddah, p. 126)
If you cannot even nod or gesture, then pray according to your situation; your rukoo’ and sujood could be by intention only, when you reach them and recite the appropriate adhkaar in them. Allaah burdens not a person beyond his scope and He has not laid upon you in religion any hardship. And Allaah knows best.