i had the same problem too. But now my dog is slightly trained.
Is it your first dog?
which breed is it?
The best way to start is wenever ur dog passes (shit and piss) in the house. stop the dog right there, hold the dog by collar and firmly say 'NO' and take him/her outside.
U can slightly slap the dog, if it is a pup be gentle but the pup shld realise that he/she did something wrong.
If it is a dog then u need to roll a paper and then hit him.
My dog is 6.5 months old. he was alos not toilet trained. wen the vet adviced same wat i wrote abv me n my family thought how can we hit him?how can we be so cruel. the result is our house stank like a shit house. he used to piss in drawing room in fornt of guests. Thats wen we realised our mistake.