Mac,
Is this form being called within a function or class? If so, you need to either declare $PHP_SELF global (bad) or pass it in as an argument (good). Otherwise, try changing:
action=\"$PHP_SELF\"
to
action=\"" . $PHP_SELF . "\"
Although PHP supports variable interpolation, I find writing in this manner often avoids problems like this. It also makes it much easier to find your variables if you're using a syntax-highlighting enabled test-editor🙂 HTH.
Geoff A. Virgo