Haha, there was more than that wrong with it. Can't believe I didn't spot that the longitude field wasn't there when I browsed the table in phpMyAdmin! Technically there were 9 fields there, because of the comma at the end, but the long and lat fields weren't in the right place.
Also, found that the ' either side of the long and lat fields were messing it all up. With those there it wasn't working. Now I've removed them its calculating the mileage fine!
I read in another topic that a user can't change their post code unless they delete their cookies?! Like the other user that posted about this I think its incredibly undesirable. Surely it wouldn't be too hard to have a page in the My Profile section that allowed you to change the post code? You could just nick the input box and code that you already have to overwrite what is already written in the cookie?