Set a link from navigation to redirect on index
This is an open discussion with 22 replies, filed under General.
Search
Hi phoque, thanks.
I removed the var_dump and echo's, and now is redirecting to:http://beta.marciotoledo.com/internal_error.html/
Resolved, thanks for all: phoque, Lewis, nickdunn.
Here is the final code: https://gist.github.com/59ba4c27d8c92c8b704e
Create an account or sign in to comment.
You mean that? You are not allowed to output anything before using
header()
. Since you're doing anecho()
right before that you're forcing PHP to send all headers and start with the content. Trying to set headers afterwards will result in the error you're seeing now.The solution: comment out the
echo()
statement.