Hi all,
I have been wondering for a while, is it possible to redirect a PHP page given a condition? I have no idea how I would do this with PHP (I cant think of how you would do it with headers as they have to be declared first on the page).
I'm sorry that I'm not explaining this very well, basically, I want the page to redirect if a condition evaluates to true.
For example:
If [I]condition[/I] {
The window will now redirect elsewhere
}
Also, I would prefer not to do it with javascript, eg:
if(condition) {
echo '<script type="text/javascript">';
echo 'window.location="http://www.php.net";';
echo '</script>';
}
Any help would be greatly appreciated,
Cheers,
Hganavak.