Hi,
I've searched the internet about how to redirect users. I found the header function which is great.
I saw alot of this type of code
If (condition) {
header ('Location: page.php');
}else {
header ('Location: otherpage.php');
}
yet, when i try it, it gives me an error (headers already sent). I then found out that the header function has to be the first line of code on the page. If that's so, how come people have the code above all over the page?
thank you