As you are having loose stools associated with white foam,it could be due to infection of gut.
IT is caused by taking contaminated food or water.
Please take antibiotic Ofloxacin with Ornidazole
.Add pre and probiotic
It will come down
Wish you good health