you can put an echo right before it to check if, first of all, that line of code is ever reached. (Of course this echo will cause the header() to throw an error if they are indeed reached, but it's just testing).
scru
Posting Virtuoso
1,629 posts since Feb 2007
Reputation Points: 975
Solved Threads: 140
This is a really common problem that occurs when using php to redirect users. The header must be at the top of the page (first thing the browser reads).
Wrong. The header can be anywhere in the script. The only thing is, you shouldn't output anything before the header function(not even a html tag). header("location: http://whatever.com/thankyou.php"); is just as good as echo("<script>location.href = 'http://whatever.com/thankyou.php';</script>");
P.S. header is comparatively faster since its a php function, where as in the other case, it should first 'echo' the redirect script.
nav33n
Purple hazed!
4,465 posts since Nov 2007
Reputation Points: 524
Solved Threads: 356
Yeah I agree with Naveen. Do your redirect before any echo or print function, , or tag. This will also help keep the logic and design separate.
buddylee17
Practically a Master Poster
697 posts since Nov 2007
Reputation Points: 232
Solved Threads: 137