ok i know how to redirect within php using
header("Location: example.php);
and i know that you cant have any white space between the <?php ?> etc etc
So my question is really, If i have an if somewhere within my code like this
if(1==$eaxmple)
{
echo "YES!";
}
else
{
header("Location: example.php);
}
It wont work. Is there another redirect i should know about or is there a work round that im missing?
Thanks