Certainly diaper is an issue here
As is the spanking too !
Hitting the child unfortunately does not solve the problem
In fact it exacerbates the situation
Since this becomes a power struggle between you and the child, and rest assured the child is unlikely to give up in this case
I would recommend that you read the following excellent article for tips on training children resistant to potty training
Do get back for any clarification
Please remember to accept the answer by pressing the GREEN accept button, do get back for any clarifications