That's not entirely correct, though.  If you are using output bufferng, then you can.  
Also, for example, say this is your file, with the makeshift line representing the top 
of the text editor:

—------------Start------------

<?php header("Location: index.php?msg=blah"); ?>
—-------------End------------

That will produce the same error as before, since a hard return was entered before the 
parser began it's work, therefore finishing the headers and sending the data to the 
client for rendering.  Hope this clears something up :o)

Martin Clifford
Homepage: http://www.completesource.net
Developer's Forums: http://www.completesource.net/forums/


>>> "Dennis Moore" <[EMAIL PROTECTED]> 07/29/02 04:18PM >>>
you cannot print or echo anything back to the browser before running the
header() function...




----- Original Message -----
From: "Varsha Agarwal" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 29, 2002 4:00 PM
Subject: [PHP] Help Please


> Hi,
> I am trying to run a sample program. It connects to a
> postgres database verifies user name and password and
> if correct, displays the login screen.
> But in that program wherever there there are
> setcookies() or header() functions, I get following
> error
>
> Warning: Cannot add header information - headers
> already sent by (output started at
> var/www/html/processing.php:5) in
> /var/www/html/common.php on line 63
>
> I checked the settings of my browser, it can accept
> all cookies.
> Someone help please!!!
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Health - Feel better, live better
> http://health.yahoo.com 
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php 
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to