PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
How could I rewrite this code so that while the page is redirecting, a message such as "please wait... you are being redirected" is shown without a "headers already sent" error?
Using this buffer method does not work... The page is redirected without errors but without the "please wait" message.
I don't want to use meta refresh nor javascript because these can be disabled in the browser options.
use a meta refresh... but then supply the user with a link in case meta refresh doesn't work... that's kinda the standard way of doing things. You can't echo out data and then send a header. It doesn't work that way... a header is exactly that, a header, so it would be send BEFORE any data. There is no way to send data before headers... EVER