What breed of dog is this?
are all four legs having problems or just the back?
Thank you for that information. There may be a disc problem going on and that can be very painful. There could be an infection in a disc or the disc could have ruptured into to spinal canal. This will require immediate help. You will have to make a muzzle for the dog so you are not hurt. Place the dog on a flat board and bring him to an Emergency vet.
directions for making a muzzle: http://www.petplace.com/dogs/make-a-dog-muzzle-vet-s-advice-on-making-a-dog-muzzle/page1.aspx