Now this one always bugs me!
I'm dealing with a lot of checks that result in redirection dependant on certain results.
1) If session exists and users lands on login.php they are pointed to index.php.
2) When landing on any page after loggining in, if their account isn't complete they're redirected to account-wizard.php to complete their profile.
3) When they land on a page it checks if they're authorised for that particular content. If not they are redirected to an upgrade page.
The list goes on...
I HATE USING
<meta http-equiv="refresh" content="0; url=http://example.com/">!!! It's slow, and only redirects after loading all of the page, even when I use exit(); after.
I can't use
header('Location: a-place.php'); because headers have already been called and with lots of them you end up with redirect errors and endless loops.
My PHP programming is VERY far from good but I'm sick of having poor code when it comes to these redirects.
What do you do!??! Thanks in advance for any support.