Re: Re: Problem redirecting
| From: | Nikola Karović | Date: | Sun, 28 Oct 2001 10:11:21 +0000 |
| Subject: | Re: Re: Problem redirecting | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-72616@lists.php.net to get a copy of this message | ||
You have to put Header( "Location:http://www.mydomain.com/mypage.html"); on
top of your php code
----- Original Message -----
From: Justin Garrett <usjgarrett@byu.edu>
To: <php-general@lists.php.net>
Sent: 28. listopad 2001 07:00
Subject: [PHP] Re: Problem redirecting
> From the manual:
>
> Remember that the header() function must be called before any actual
output
> is sent, either by normal HTML tags blank lines in a file, or from PHP.
>
> This is the cause of your error. Something is sending output before your
> call to header();
>
> --
> Justin Garrett
>
> "Don" <mail4donpro@home.com> wrote in message
> news:000c01c15f67$1a06ad80$4fad2b18@ym1.on.wave.home.com...
> Hi,
>
> I have a form which when submitted, calls an html page which contains PHP
> code. Within that code, I wish to redirect my users to another page under
> certain conditions. So, in my code, I have the following lines:
>
> Header(
> "Location:http://www.mydomain.com/mypage.html");
> exit;
>
> However, when the above is run, I get the following error generated:
>
> Warning: Cannot add header information - headers already sent by (output
> started at /usr/local/www/vhosts/mydomain.com/htdocs/mypage.html:7) in
> ../phpscript/general/formmail.php on line 100
>
> Does anyone know what this error means?
>
> hanks,
> Don
>
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net