Undigested material goes to the large intestine, toward the rectal area.
large intestine
The undigested food, a large amount of water and dissolved salts go into the large intestine from small intestine. After then water and salts are absorbed into the blood, while undigested material is rejected as faeces.
The Anus (I am not very sure though I think this is correct)
Large Intestine
The large intestine is attached to the posterior to the small intestine and as you maybe already know the small intestine is where food wastes go and bile is secreted into. The large intestine reabsorbs water from the ingested food particles before they enter the rectum and colon for excretion.
Anything not absorbed by the small intestine will eventually exit through the rectum.
small intestine
Food that leaves the stomach is called chyme. The chyme passes through a short passage called a duodenum. The duodenum releases enzymes which help digest the chyme before it passes into the small intestine. The small intestine absorbs the nutrients into the blood stream, and then passes digested chyme into the large intestine. The large intestine re-absorbs the water that was mixed into the chyme in the stomach, duodenum, and small intestine. The large intesting then compacts the undigested material into the stool, which passes into the descending colon. . When sufficient stool collects in the colon, it passes into the rectum. When stool collects the rectum, you develop an urge to defecate, which is the expulsion of the stool from rectum out the anus.
Small intestine.
large intestine
After passing through the small intestine, digested food moves into the large intestine (also known as the colon). In the large intestine, water is absorbed and the remaining waste material is formed into feces before being expelled from the body through the rectum and anus during a bowel movement.
The order is as follows: Stomach, small intestine, large intestine.