I have a webpage mypage.htm that has a form which has it's action as "mypage.htm" I.e. Reloads itself with some posted values
I have some embedded PHP which check the fields are valid (email address, not blank etc) and if they are not shows an error against the invalid entries
An internal field "$allvalid" is 0 when all is ok and > 0 when errors are present
I want to redirect "mypage.htm" to some other page I.e. "success.htm" if $valid=0, I've tried the "Header: Location ..." but this won't work because I am already outputting data to screen
Any ideas?