Do this then. Assign the submit button a name like submit and a value like Submit This Form. At the beginning of your page, before anything else is processes (line 2), put the following:
if($submit == "Submit This Form") {
header("Location: wherever.php4");
}
That way, if the page is loaded first time around, the redirect is ignored. When it is resubmitted, you get the redirect.
Of course, you get the same affect by simply putting the page you want them to go to in the action clause. If you want the form info to process first prior to this, you can place the processing in the statement above prior to the header() call. Once all the processing is done, do the redirect. Going one step further, you really don't need to do the redirect using the clause above at all, because the clause only executes after the form was submitted. Do this:
if($submit == "Submit This Form") {
do whatever it is you want to do here after the form is submitted, including telling the user the form was submitted, update database, etc.
} else {
print out the form for the user to fill out.
}
If you do it this way, place the conditional statement after the head of the document so it prints out correctly. When the page loads the first time, there is no $submit so the form is generated. When the client clicks the submit button the processing occurs because $submit now equals "Submit This Form."
HTH.
Jim Hawley