RE: [PHP] Warning with Header("Location: test.php")
| From: | Peter Houchin | Date: | Tue, 26 Nov 2002 04:26:11 +0000 |
| Subject: | RE: [PHP] Warning with Header("Location: test.php") | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-126040@lists.php.net to get a copy of this message | ||
your header command must go before any other out put to the page ..
eg
<?PHP
lots of or no php other stuff, with out writing to the page
..
..
..
Header("location: test.php");
<html>
<head>
<title>boo</title>
</head>
<body> etc
> -----Original Message-----
> From: Padmini.Dey@desconsoft.com [mailto:Padmini.Dey@desconsoft.com]
> Sent: Tuesday, 26 November 2002 3:02 PM
> To: php-general@lists.php.net
> Subject: [PHP] Warning with Header("Location: test.php")
>
>
> I have user Header("Location: test.php") in a php file. It is not working,
> instead I have got a warning of the form
>
> Warning: Cannot add header information - headers already sent by (output
> started at /var/www/html/test.php:5) in /var/www/html/test.php on line 15
>
> Here line 15 contains the Header ("Location:test.php") line.
> I will be grateful if you can help me.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>