On Wed, 29 May 2002, Tim Thorburn wrote:
> The error the header() command is giving me now is:
> 
> Warning: Cannot add header information - headers already sent by (output 
> started at \registrations\reg_mudfling.php:5)
> 
> I've moved the header command around (line position) and still nothing ... 
> not sure why its suddenly not working.  I've been trying to add an extra 
> feature to the form - sending an email to the admins if the form doesn't 
> get entered into the database, but even when I take the email part out its 
> still giving this error message.

This means you are generating some other output (either intentionally, or 
through whitespace outside your PHP tags) before calling the header() 
function.

That's a no-no. You can get around it by using output buffering, but it 
doesn't change the fact that you don't want to generate any output if 
you're going to redirect the user to another page.

Do all your checking silently, then either redirect them somewhere else, 
or start sending output as normal, depending on the result of your checks.

miguel


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

Reply via email to