Would taking magnesium help my severe constipation?

Would taking magnesium help my severe constipation?I have been severely constipated since I was about 7. I have been wondering about taking magnesium. Would this help? I've tried all the over-the-counter (OTC) medications but to no avail. I've eaten lots of fruit and veggies, and this works for about 4 days. I also drink lots of water, 6-8 glasses a day, sometimes more. I live in Canada, so we don't get all the products that you do.Magnesium has many formulations and many uses. Magnesium citrate, sulfate and hydroxide can be used for the treatment of constipation. Magnesium sulfate is the most potent. Magnesium can also be used as an antacid. Magnesium carbonate, hydroxide, oxide and trisilicate are used for this indication. The hydroxide salt has the fastest onset of action. The carbonate formulation is slower and the trisilicate form has the slowest but longest time of action because it is poorly soluble. For people with magnesium deficiency, such as liver cirrhosis, alcoholism, congestive heart failure and chronic diarrhea or vomiting, pancreatitis, malabsorption, kidney disease, pancreatitis, and inflammatory bowel disease, magnesium supplementation is necessary. Magnesium gluconate or chloride is a good choice since it causes less diarrhea. Magnesium oxide should be avoided due to side effects like diarrhea and the carbonate is not very soluble.