Back pain and Exercise

Hey, I’m new to this forum. I work for more than 10 hours a day. This made my health condition worse. I suffered from severe back pain and neck pain. So my friends advised me to start the exercise. And I started to go cycling in the morning and to a gym in the evening. But this made my pain even more severe. Immediately I consulted a doctor and he suggested massage therapy. The therapy is very soothing and relaxing. Now I’m feeling better. If anyone is suffering from pain, go and consult a doctor and after that start the other physical exercises.
Thank You!