Re: isset function problem
| From: | Dean E. Weimer | Date: | Thu, 10 Jul 2003 13:59:07 +0000 |
| Subject: | Re: isset function problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-154732@lists.php.net to get a copy of this message | ||
What about the rest of the code? How is this variable defined? I have
had this happen in some code before, I found that the variable was set to
"". Try using:
if (isset($SenderEmailAddress) && $SenderEmailAddress != "") {
mail($mailTo, $mailSubject, $Message);
}
> 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?
>
> Thanks
> Denis
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Thanks,
Dean E. Weimer
http://www.dwiemer.org/
dweimer@dweimer.org