you might have hyper acidity with gastritis
If you have frequency of motions or griping pain while passing stool you may have intestinal infection,bacterial or amoebic.
take light diet,plenty of liquid,curd,butter milk and rice. Avoid fried and chillies food.
and antispasmodic medicines.
If no relief then go for stool test
and ultra sound