I think its pretty sad that instead of your doctor encouraging you to fix your neck problem, he is insisting you stay away from activities that make it "act up". Very sad...
Obviously, you have some sort of disc or inflammation problem in your spine column and walking aggrevates it. I suggest you see a chiropractor or therpaist.