If the case is as you mentioned, it is necessary for you
to perform Istinja' (cleansing the private parts with water after urination or defecation) before Wudu' and wash the parts of your body or clothes that have been contaminated by urine. Then you have to perform Wudu' and Salah, and repeat this procedure whenever something comes out of you in the way you described and you want to perform Salah. And Allah knows best.May Allah grant us success. May peace and blessings be upon our Prophet Muhammad, his family, and Companions.