Ask a Question related to PHP Development, Design and Development.
-
Gavin #1
Simple problem I think!!!!!
I have the following code:
if(mail($to,$subject,$body,$from))
{
//go to Spoono
Header ("Location: http://www.spoono.com/"); - Line 21 is here.
}
else
{
//else go to Yahoo
Header ("Location: http://www.yahoo.com/");
}
Easy Eh!!!
NOOOOOOOOOOOOOOOOOOOO.
I get this error ALLLLL the time, and can't work out why. Any Ideas?
Warning: Cannot modify header information - headers already sent by (output
started at /home/www/listerradio.com/mail.php:12) in
/home/www/listerradio.com/mail.php on line 21
Thanks
Gavin.
Gavin Guest
-
XML::Simple problem
A simple test script: #! /usr/bin/perl -w use DBI; use XML::Simple; use Data::Dumper; use strict; my $xmlconfig = XMLin(); print... -
LWP::Simple get() problem
Hi, I am having problems with the following code, in which the get() function from the LWP::Simple is not retrieving any of the contents of the... -
a very simple problem!
hi ... When i click to the submit button, i want to insert value from the a text box to the mysql db. But when i enter text in the text box... -
Best Way To Do This --- Simple Problem
I need to list a few rows of data in text format, for example: ID: 5442224 ID: 5311255 ID: 3536463 The values will be bound to either... -
A simple problem with a really simple form
Hi there, I'm having a problem with designing a very small form in Dreamweaver. Its just a login form with username and password textfields - the... -
Janwillem Borleffs #2
Re: Simple problem I think!!!!!
Gavin wrote:
This is the most frequently asked question of them all.> I get this error ALLLLL the time, and can't work out why. Any Ideas?
>
> Warning: Cannot modify header information - headers already sent by
> (output started at /home/www/listerradio.com/mail.php:12) in
> /home/www/listerradio.com/mail.php on line 21
>
To quote the manual ([url]http://www.php.net/header):[/url]
"Remember that header() must be called before any actual output is sent,
either by normal HTML tags, blank lines in a file, or from PHP."
JW
Janwillem Borleffs Guest
-
Ike #3
Re: Simple problem I think!!!!!
Please send your entire code so we can have a look!
"Gavin" <a@b.com> wrote in message
news:WAE_c.91$6m1.61@newsfe5-gui.ntli.net...(output> I have the following code:
>
> if(mail($to,$subject,$body,$from))
> {
> //go to Spoono
> Header ("Location: http://www.spoono.com/"); - Line 21 is here.
>
> }
> else
> {
> //else go to Yahoo
> Header ("Location: http://www.yahoo.com/");
> }
>
> Easy Eh!!!
>
> NOOOOOOOOOOOOOOOOOOOO.
>
> I get this error ALLLLL the time, and can't work out why. Any Ideas?
>
> Warning: Cannot modify header information - headers already sent by> started at /home/www/listerradio.com/mail.php:12) in
> /home/www/listerradio.com/mail.php on line 21
>
> Thanks
>
> Gavin.
>
>
Ike Guest
-
Janwillem Borleffs #4
Re: Simple problem I think!!!!!
Ike wrote:
Not necessary, see my reply. A simple case of RTFM.> Please send your entire code so we can have a look!
>
JW
Janwillem Borleffs Guest
-
Tom Thackrey #5
Re: Simple problem I think!!!!!
On 5-Sep-2004, "Gavin" <a@b.com> wrote:
The problem is mail() is generating some output which prevents header() from> I have the following code:
>
> if(mail($to,$subject,$body,$from))
> {
> //go to Spoono
> Header ("Location: http://www.spoono.com/"); - Line 21 is here.
>
> }
> else
> {
> //else go to Yahoo
> Header ("Location: http://www.yahoo.com/");
> }
>
> Easy Eh!!!
>
> NOOOOOOOOOOOOOOOOOOOO.
>
> I get this error ALLLLL the time, and can't work out why. Any Ideas?
>
> Warning: Cannot modify header information - headers already sent by
> (output
> started at /home/www/listerradio.com/mail.php:12) in
> /home/www/listerradio.com/mail.php on line 21
working properly. Put an @ in front of the mail function call to suppress
mail()'s output:
if (@mail(...)
--
Tom Thackrey
[url]www.creative-light.com[/url]
tom (at) creative (dash) light (dot) com
do NOT send email to [email]jamesbutler@willglen.net[/email] (it's reserved for spammers)
Tom Thackrey Guest
-
Andy Hassall #6
Re: Simple problem I think!!!!!
On Sun, 05 Sep 2004 13:33:42 GMT, "Gavin" <a@b.com> wrote:
Look on line 12.>output started at /home/www/listerradio.com/mail.php:12
--
Andy Hassall / <andy@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
Andy Hassall Guest
-
Gavin #7
Re: Simple problem I think!!!!!
I knew it had to be simple. Thanks, all sorted now.
Gav.
"Janwillem Borleffs" <jw@jwscripts.com> wrote in message
news:413b1995$0$7130$abc4f4c3@news.euronet.nl...> Gavin wrote:>> > I get this error ALLLLL the time, and can't work out why. Any Ideas?
> >
> > Warning: Cannot modify header information - headers already sent by
> > (output started at /home/www/listerradio.com/mail.php:12) in
> > /home/www/listerradio.com/mail.php on line 21
> >
> This is the most frequently asked question of them all.
>
> To quote the manual ([url]http://www.php.net/header):[/url]
>
> "Remember that header() must be called before any actual output is sent,
> either by normal HTML tags, blank lines in a file, or from PHP."
>
>
> JW
>
>
>
Gavin Guest
-
morfy50 #8
Re: Simple problem I think!!!!!
All you have to do is use output buffering. simply call
ob_start()
before anything else runs.
Tom Thackrey wrote:> On 5-Sep-2004, "Gavin" <a@b.com> wrote:
>
>>>>I have the following code:
>>
>>if(mail($to,$subject,$body,$from))
>>{
>> //go to Spoono
>> Header ("Location: http://www.spoono.com/"); - Line 21 is here.
>>
>>}
>>else
>>{
>> //else go to Yahoo
>> Header ("Location: http://www.yahoo.com/");
>>}
>>
>>Easy Eh!!!
>>
>>NOOOOOOOOOOOOOOOOOOOO.
>>
>>I get this error ALLLLL the time, and can't work out why. Any Ideas?
>>
>>Warning: Cannot modify header information - headers already sent by
>>(output
>>started at /home/www/listerradio.com/mail.php:12) in
>>/home/www/listerradio.com/mail.php on line 21
>
> The problem is mail() is generating some output which prevents header() from
> working properly. Put an @ in front of the mail function call to suppress
> mail()'s output:
>
> if (@mail(...)
>morfy50 Guest



Reply With Quote

