Forum Moderators: coopster
This if statement is within the mail function. If you want the rest of the code let me know.
My goal is to redirect a guest to one page if they selected something on the form whose value is Yes.
If they didn't select it then they will be directed to another page.
My script runs but it always redirects to the first header.
The HTTP Header is sent out before even the very first HTML tag on the page.
That number is 200 if the page is found, and 404 if it is not found.
If the page has moved, it will be 301 or 302. There are major problems with 302 so you will almost always want to use 301.
You'll also come across 304, 307, 401, 403, and 500 on your travels. There are many previous threads with details.
The Live HTTP Headers extension for Mozilla Firefox and Mozilla Seamonkey can show you exactly what is going on.
Many pre-HTTP/1.1 user agents do not understand the 303 status. When interoperability with such clients is a concern, the 302 status code may be used instead, since most user agents react to a 302 response as described here for 303.