(This topic is very similar to another posting named: php mail form with redirect to same page)
I know that you aren't supposed to output anything to the browser before using the header location function but what if you need to show an error message? If there is an error, for example, an invalid email address, then I want to show an error message and go back to the form submission page. After all of the errors have been corrected, I want to redirect to the next page. However since I already sent an error message, I can't send a header. Is there a way to do this without resorting to javascript?
Page Redirect after Error Message is Output to the Browser
Moderator: General Moderators
Re: Page Redirect after Error Message is Output to the Brows
No.
Well, yeah, with a <meta> refresh, but,
Why not display the message on the form itself?
Well, yeah, with a <meta> refresh, but,
Why not display the message on the form itself?