Re: Send_mail function

From: Date: Fri, 11 Aug 2000 16:14:14 +0000
Subject: Re: Send_mail function
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-11349@lists.php.net to get a copy of this message
I believe your elseif statement should read elseif ($chr == "B" || "C" || "D") { send_to_you(); } Ben > From: "David Tandberg-Johansen" <david@datajo.no> > Date: Fri, 11 Aug 2000 17:23:52 +0200 > To: php-general@lists.php.net > Subject: [PHP] Send_mail function > > Hallo All!! > > I am trying to send a mail to an different mail acount based on which > variable $chr has, but it seems to only go strait to the last ELSE and > print. > > Could anyone please give me som feedback,....Thank's > > ************************************ > function send_mail() > { > if ($chr == "A") > { > send_to_me(); > } > elseif ($chr == "B|C|D") > { > send_to_you(); > } > else > { > print("The are no characters to report"); > } > } > ************************************ > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.general (#11349) next »