constipation & allergies

Hi being suffering from constipation for a while now, been refered to gasto and i asked him was it possible that i could maybe have allergies to certain foods which leads to me being constipation n he said no cz allergies would make you have loose stools, is this correct as i keep reading that its not, however he told me to ignore what ever i had read on the net.Any advice would be great Thanx Danni