You don't say how old the dog is, so if it's a puppy it needs training, if it's an older dog it needs retraining. An older dog will quite often do this if it's been upset and feels the need to mark it's territory. It may be worth taking him to the vets just to check out that there's nothing wrong, something like cystitis can cause this, even males can get this.
Take the dog outside regularly so his 'tank' is emptied often. Praise him every time he does his business outside. Clean the carpet with either a preparation bought from a pet store or you could try undiluted white vinegar, bicarbonate of soda or a clear alcohol. Blot up the excess first and as fast as you can after the 'accident'. If your dog keeps returning to the same place to pee, after cleaning it, put something in way whilst it dries, then either put a bowl of dog food there, (they don't like eating in a toilet any more than we do), or spray the area with citronella. They hate the smell.
taytay4387 answered Thursday June 9 2011, 11:06 pm: You need to shove its nose in it(they hate the smell) you might think that it hurts but do it to make it stop and if it is poop do the same thing but do not touch it [ taytay4387's advice column | Ask taytay4387 A Question ]
WittyUsernameHere answered Thursday June 9 2011, 4:28 pm: Puppies react better to positive encouragement than punishment for doing wrong.
First, you need some words he will start to recognize. "Go pee" is a pretty easy one, you want simple words he'll start to recognize immediately.
Second, whenever he pees inside you need to take him outside. By this, I mean if he is peeing you pick him up and carry him outside, getting pee on yourself in the process, to get him out there.
Third, any time he pees outside, make a big deal out of it. Praise him, tell him he's a good boy, be enthusiastic (no treats, just praise). I was told by someone else, if you wouldn't be slightly embarrassed to do it in public you aren't being enthusiastic enough.
Fourth, keep an eye on him. Get a baby gate so he can't go off into other places in the house. Try to make it so he can't get away with it and have you find it later, keep him in sight so you can grab him and take him outside.
Fifth, watch his drinking. Take him outside half an hour after he eats or drinks more than just a tiny sip. Use the words, if he pees, praise him. If he doesn't, wait 30 minutes and take him out again, try to get him used to a schedule where he knows he will go outside after he eats to go to the bathroom.
Last, watch and see if he goes near the door. Dogs will quickly figure out where to get out of the house and will often go there when they need to go out, once that association is made. If you see him near the door, take him out and try to get him to pee, if he doesn't bring him back in immediately (give him a minute or two where you tell him to go). This will get him used to the idea that if he goes to the door you will take him outside to pee, and bringing him back in if he doesn't will let him figure out that he can't just go play outside by going to the door. Take him outside of your own accord when he's not by the door so he knows he'll get to go outside some of the time (you should be walking him regularly anyway).
Do all this, and it should help a good bit. Dogs are like small children, they need routine and structure. If you establish a pattern of behavior he can understand he will learn to fit himself into it. Make it a positive experience and he will figure out what you want. [ WittyUsernameHere's advice column | Ask WittyUsernameHere A Question ]
Attention: NOTHING on this site may be reproduced in any fashion whatsoever without explicit consent (in writing) of the owner of said material, unless otherwise stated on the page where the content originated. Search engines are free to index and cache our content. Users who post their account names or personal information in their questions have no expectation of privacy beyond that point for anything they disclose. Questions are otherwise considered anonymous to the general public.