you could have an infection, you probably need to call the dr or go back to get checked. try some ibuprofen but if you still feel bad see a dr. take care of yourself.
I'm sorry to hear of your loss. Bleeding after a d&c or miscarriage can last a few days to a few weeks. Sometimes there is some cramping as things are trying to go back to normal, but you shouldn't be in so much pain that you can't walk. I'd recommend calling your doctor ASAP and letting her know what's going on. The yellowish color could indicate that you have an infection.