Hello....This sounds as if you have an emergency on your hands.....What your describing could be anything from poison to kidney failure to just painful arthritis.....We have no way of knowing which one it is....Please, get your dog to a Vet ASAP to be evaluated...Time may be of essence....Make the call, now....
Come back and let us know what you find out as it can help others on this forum...Good luck, Karla
So sorry to hear this but it definitely sounds like this can be serious and would be very hard to give advice in this forum. You absolutely need to get him into the Vet to be checked. No way to even guess what might be going on and it would only be a guess.
Hope you can get him in and all is okay