First, are you eating a ton of spicy foods? If you are, maybe you should either slow down or stop completely. People who eat spicy foods pretty regularly usually have a problem like what you are having. The spices in the food actually irritate the body’s digestive system all the way down to when they are expelled from your body. When you poop, the spicy foods you have eaten will actually feel like they are burning your anus when they come out! And if you keep eating all those spicy foods, you may end up with diarrhea (which means burning and bloating and more pain!).
Another possibility is hemorrhoids. These are swelling and inflammation that can be anywhere from within your rectum to your anus. Many things can cause hemorrhoids but they are usually caused from some sort of straining. This could be delivering a baby, pushing too hard when you are constipated, and even from heavy lifting, among other reasons. When hemorrhoids swell up and become inflamed, you may have itching, severe pain, or even bleeding when you poop.
Those are the two usual reasons for pain when you poop. Sometimes though the pain could be caused by certain diseases, such as:
- An abscess can cause pain when you poop and even at other times. An abscess is quite like a boil. Sometimes you can feel to locate an abscess but other times you may have to see a doctor to find its exact location and for treatment.
- Herpes causes pain in any area it is found. This includes genital herpes (which can be also found on the anus). When herpes acts up on the anus, it actually causes cracks in the skin. This can definitely be painful when having a bowel movement.
- An anal fissure can definitely be painful like you area describing. An anal fissure is a tear within the anus. The pain you describe as “a knife” could be the same as the pain with this (usually described as a piece of glass). There could also be blood on the toilet paper when you wipe.
As with anything though, it’s always best to contact your physician so he or she can find out what is actually going on, and to find a remedy.