Kid and dogs keep getting out

My older (3) children aged 13, 11, and 9 sometimes don't close doors, and outside gates. My 2 year old, and 2 dogs have gotten out because of this. What do I do to prevent this from happening??