and heart burn are caused by inreased acid secretion (HCl) by the stomach and regurgitation of the acid towards the esophagus
You can prevent this condition by:-
1. Avoid remaining empty stomach for long time.Take frequnt meals.
2. Avoid spicy and oily foods.
3. Avoid smoking.
4. Drinking plenty of water.
5. Medicines like Ranitidine
in combination with Domperidone
6. Use of Antacid gel.
7. Get yourself treated for H.Pylori infection, if any.
Also have an Endoscopy done to check any mucosal damage.
Hope tis is helpful to you.Thanks