Re: Error when execute header('location: otherpage.php') after email been sent out. Any Workaround?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2009-08-28 at 17:32 +0800, Keith wrote:
> I have a user sign up page that collects sign up information from user with 
> form.
> This form will then be submitted to another process.php page for setting up 
> the user account and send email to the user.
> After the email been sent out, the user will be directed back to homepage 
> with header("location: index.php").
> However, error happen with warning: [Cannot modify header information - 
> headers already sent by...]
> Any workaround for this?
> 
> Thanks for help!
> Keith
>  
> 
> 

You don't need a workaround. The header("Location...") thing will only
work if you have not sent any content to the browser yet. That includes
even a single space or newline.

It looks like in your process.php page, something is being output to the
browser. Are you able to do a code dump of that page?

Thanks,
Ash
http://www.ashleysheridan.co.uk




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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux