This code is totally mashed. You've mixed js and php. I assume you want to use Ajax, so that the shipping price is calculated in-page when a new option is chosen. This isn't the way to do it.
diafol
Rhod Gilbert Fan (ardav)
7,796 posts since Oct 2006
Reputation Points: 1,170
Solved Threads: 1,080