Yeah, I strongly suspect you're right, Superwormy. My impression from the manual was that all 'pre-defined' variables are automatically global and therefore a global statement is unnecessary - I've never seen it declared separately in a form that uses $PHP_SELF as action. And, yes, you're right about the problem of having JS switched off. If I was writing a really big and complicated form I would write code to check for JS and have two different validation paths based on the result - one in which JS checks for completeness before switching to PHP for validation - but it's hardly worth it for my piddling little 'send me your comments' form. I'll stick to what I know and love - PHP.
However, the technique of writing variables to the browser is a good debugging approach, so thanks for the tip anyway, Paulnaj.
What do you think of this thread? I've mirrored Delstrange's approach in a lot of ways, although he doesn't check for nasty scripts because his final action is just an e-mail as opposed to a DB insertion.
Thanks
Norm