What would cause yellow foamy stool and a kind of stabbing pain between the ribs and hips on the left side. I'm a 17 year old girl. This is scaring me?

See Dr if no improv. If yellow diarrhea shows up suddenly, the most common cause is a bacterial or parasite infection (salmonella, E. coli and Giardia lamblia) Pain under the left side suggests pancreas or spleen trouble. The color of feces is directly related to the amount of bile salts excreted from the liver. If the process is inhibited eg. by a gallstone, feces gradually will change color and become yellow.