Re: isset function problem

From: Date: Thu, 10 Jul 2003 14:47:19 +0000
Subject: Re: isset function problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-154740@lists.php.net to get a copy of this message
On Thursday 10 July 2003 21:53, Denis L. Menezes wrote: > I have the following code : > > Quote: > > if (isset($SenderEmailAddress)){ > mail($mailTo, $mailSubject, $Message); > } > > Unquote > > All I want to do is that , if the $SenderEmailAddress is not entered, the > mail() function should not run. However, > if the $senderEmailAddress variable is not set, the error I get is "No > recipient addresses found in header " > > Can someone help and tell me why I get this error? Use if (!empty(...)) instead. Depending on how you're getting your variable it may be set but empty. And where are you getting $mailTo? Isn't that supposed to contain the recipients? -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * ------------------------------------------ Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general ------------------------------------------ /* Humor in the Court: Q: ...and what did he do then? A: He came home, and next morning he was dead. Q: So when he woke up the next morning he was dead? */

« previous php.general (#154740) next »