Hi,
Constipation can cause bloating and flatulence and it can occur due to a number of causes like a sudden change in dietary habits, excess intake of dairy, taking a low fibre diet, lack of physical activity, stress, 
hypothyroidism, diabetes, 
irritable bowel syndrome, eating disorders etc.
I would suggest you consult an Emergency room or a Gastroenterologist and get evaluated and he can advise you investigations like ultrasound etc to rule out the exact cause of the problem and treat you accordingly.
You can be advised to take high fibre diet, do a moderate workout, take walk after meals, drink plenty of water, take laxatives and stool softeners like Docusate, 
fibre supplements like Psyllium.
You should eat every after 2 hours.
Go to the toilet at the same time every morning and try to evacuate your bowels as it can help in developing the habit of regular bowels.
 As far as rash is concerned it can be due to 
fungal infection however if it is spreading you should immediately get it checked and can be treated once the nature of the rash is diagnosed.
Hope I have answered your query. Let me know if I can assist you further.
Take care
Regards,
Dr Honey Arora, Dentist