My 4 yo dd had a similar urinary problem earlier this year. She started peeing herself all of a sudden. Sometimes it was just enough to dampen her panties & other times it was a whole bladder full. I finally took her to our ped's partner (because I thought she'd feel more comfortable with a woman). She said that it's common in this age group for kids to hold it when they have to go & sometimes that causes the muscles that control urine flow to spasm. She said to push lots of fluids & we used Ditropan for 5 days to stop the spasming. That stopped it & she hasn't had trouble for a few months now. I know that when one of my boys had some similar pooping issues, the ped did comment that it can often be stress induced, so maybe the urinary problem can be as well.