Using header("Location:page")
immediately exits your script and redirects the user to that page. However, I have successfully accomplished something very similar (to what I think you want) by scripting a Website Registration API.
In total, I wrote 3 critical scripts, plus the original form page, in/out functions, and an assortment of data storage modules to create a seamless process. Your needs might not be as complicated as mine, but I found this to be much more involved than a simple 'validation check'.
Basic outline:
- page original form is on: submit sends form data to script
- script parses incoming data and determines action
- each input variable is parsed
- if form data is empty: user is sent to original (blank) form page
- if form data flags bad input: the form is reprinted (errors in red)
- if form data is legit: data is stored; script advances to user portal
- login/logoff functions
Try to solve your problem by thinking about each step of the process and breaking it down into bite-size pieces. (first you have to see the input, then you have to check the input, etc.)