can you give a little more information? I have a son that is 6 and he still has accidents as well. many that I have read on here want to blame the parents, however as I know, it isn't anything that I have done or lack of doing. also you can research encopresis.
Here is one article on it: http://kidshealth.org/parent/general/sick/encopresis.html
Does he do this at school aswell as at home? is he constipated , is it a full bowel movement or is is just stains on his underwear? When he is at school does he have full access to ho to the bathroom when he needs to go or do they have to wait till break time? It would be good if you gave us this further information ....