RE: [PHP] redirect using header

From: Date: Thu, 27 Mar 2003 19:19:18 +0000
Subject: RE: [PHP] redirect using header
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-141297@lists.php.net to get a copy of this message
Read the manual section on headers. A header must be sent before any other output, including whitespace, so putting it in the middle of an HTML page is totally not going to work. http://www.php.net/manual/en/function.header.php -----Original Message----- From: David Banning [mailto:david@skytracker.ca] Sent: Thursday, March 27, 2003 11:15 AM To: php-general@lists.php.net Subject: [PHP] redirect using header I have been trying to do a redirect with header; <HTML> <HEAD> <TITLE>Optex Staging and Services Inc. </TITLE> </HEAD> <BODY> <?php header('http://newwebpage.com'); ?> <H3> <FONT COLOR="#3333FF">Stand By For Terminal...</FONT></H3> </BODY> </HTML> I keep getting the error; Warning: Cannot modify header information - headers already sent by (output started at /usr/hosting/optex/goterm/temp.html:8) in /usr/hosting/optex/goterm/temp.html on line I have tried the header statement in different postions, and also tried eliminating the existing <HEAD> section with no difference. What am doing wrong here?

« previous php.general (#141297) next »