When I saw your stats the other night, I knew you had managed to find something, I just couldn't be bothered to go back through database logs to find out what!
Gave me a good reason to go through the code and find out though... if I'm honest, the gym.php page is the worst code of all the code I've produced so far, so I'm considering just starting completely from scratch on it to make sure I get everything working as intended.