note 7819 added to header
| From: | romi at accord-soft dot com | Date: | Wed, 16 Aug 2000 10:36:12 +0000 |
| Subject: | note 7819 added to header | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-1947@lists.php.net to get a copy of this message | ||
Sir / Madam,
Please don't get alarmed at getting this error-message as it might be too small or unimaginable
to you. I am a beginner in the field. I am constantly getting this following error-message for the
"header" function that I am using.
Warning: Cannot add header information - headers already sent by (output started at c:\program
files\apache group\apache\htdocs\do_calculate.php:8) in c:\program files\apache
group\apache\htdocs\do_calculate.php on line 35
... for the following source code:
if($site == "Hotmail") $site_to_connect = "http://www.hotmail.com/";
else if($site == "USA.NET") $site_to_connect = "http://www.usa.net/";
else if($site == "Yahoo") $site_to_connect = "http://www.yahoo.com/";
echo "<P><font face = arial size = 2>Sending you off to
$site_to_connect.</font></P>";
header("Request-URI: $site_to_connect"); /*Line 35*/
whereas line 8 says: <?php
and that's all!
-Romi
http://www.php.net/manual/function.header.php