Advertisement

05.07.2008 at 07:50PM PDT, ID: 23384931
[x]
Attachment Details

Using headers to redirect webpage

Asked by ilakshmir in Hypertext Markup Language (HTML), PHP Scripting Language

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
[+][-]05.07.2008 at 07:58PM PDT, ID: 21522006

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]05.07.2008 at 08:21PM PDT, ID: 21522102

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]05.07.2008 at 11:52PM PDT, ID: 21522768

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Hypertext Markup Language (HTML), PHP Scripting Language
Sign Up Now!
Solution Provided By: DreamAwake
Participating Experts: 3
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628