hi folks i've been getting an error quite often lately when posting to the forum.
I couldn't upload the code directly (looks like the site is trying to prevent users inputting escape codes or doing SQL injection) so have copied it to the following location http://pastebin.com/m6RTCtbr