I usually use headers to redirect webpage after executing a script. For example:
if (some condition)
header("
www.xyz.com/homepage.html");
exit;
else
header("
www.xyz.com/error.html");
exit;
I would like to know if there are other ways of doing such redirection. With this technique, when I send an email if "some condition" is met, headers in the email get executed and cause the foll error:
Warning: Cannot modify header information - headers already sent by (output started at somepage) in C:\somedir\somwhere.php on line 400).
I would appreciate if you could illustrate with code/examples.
Start Free Trial