I've just transferred an application to IIS and strange things happening.
A.php
a form with two submit buttons.
Button B calls header("location: B.php")
B.php
a form action=$PHP_SELF to validate contents.
on submit, goes to A.php !!
Change 'action = $PHP_SELF' to B.php and it works.
(Using $_SERVER['PHP_SELF'] gives same results.)
So the question is why, in B.php, is $PHP_SELF==A.php?