Re: How to write errorhandling??

From: Date: Sun, 21 Oct 2001 18:54:37 +0000
Subject: Re: How to write errorhandling??
References: 1 2  Groups: php.db 
Request: Send a blank email to php-db+get-13583@lists.php.net to get a copy of this message
"Attila Strauss" <shortys@gmx.li> wrote in message news:01102113081306.00694@pluto... > hi > > do an > > exit; > > after the header(); > > cu > attila > > > > On Sunday 21 October 2001 12:45, Luditus wrote: > > Hi Fokes, > > > > I would like to send an mail via the mail function. > > > > If the mail failes I would like to redirect to an errorpage. Currently my > > code looks like this: > > > > if ( mail($email,$subject_confirm_account, $message_confirm_account, > > $from_confirm_account) ){ > > HEADER("Location:index.php?fuseaction=txt&msg=registered"); //success > > } > > else{ > > HEADER("Location:index.php?fuseaction=txt&msg=mailproblem"); // mail > > could not been sent > > }; > > > > Unfortunatelly I get an erromessage like that: > > > > Warning: Failed to Connect in > > e:\projects\globosapiens\07_production\actual\account\include\user.php on > > line 256 > > > > Warning: Cannot add header information - headers already sent by (output > > started at > > e:\projects\globosapiens\07_production\actual\account\include\user.php:256) > > in e:\projects\globosapiens\07_production\actual\account\include\user.php > > on line 260 > > > > Where is the problem??? I can't see it. > > > > Maybe one of you guys could help me out. > > > > Thanx in advance, > > > > Luditus My experience is that ypu cannot use the header command if ypu type any text or something like that before the header.. i had to place the header on the top of the php page and if error goto header_func (of something like that).. i probably don't make sense.. to tired, =)

« previous php.db (#13583) next »