RE: [PHP] php redirect
| From: | Martin Clifford | Date: | Fri, 26 Jul 2002 15:25:19 +0000 |
| Subject: | RE: [PHP] php redirect | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-109755@lists.php.net to get a copy of this message | ||
Learning about HTTP protocol helps a LOT with understanding headers. Basically, the headers are
generated by the server to tell the client (browser) what to do. If you send ANYTHING (even a hard
return) before the header function is invoked then you will get this error. In essence, if you are
going to use the header() function without output buffering, then it should be just like this:
―--top of text editor----
<?php
header("Location: blah.php");
?>
―-- End of text editor----
Martin Clifford
Homepage: http://www.completesource.net
Developer's Forums: http://www.completesource.net/forums/
>>> "Tyler Durdin" <linuxgeek23@hotmail.com> 07/26/02 11:21AM >>>
I already tried that and i got an error that said Cannot add header
information - headers already sent by (another snippet of code I have in the
page.
>Use the header() function
>
>http://www.php.net/manual/en/function.header.php
>
*************************
_________________________________________________________________
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php