Re: Suppressing error from displaying

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Nov 24, 2010 at 14:13, Ron Piggott
<ron.piggott@xxxxxxxxxxxxxxxxxx> wrote:
>
> I am using this syntax to check for a valid e-mail address
>
> list($userName, $mailDomain) = split("@", $buyer_email);
> if (checkdnsrr($mailDomain, "MX")) {
>
> if no domain is provided ( ie e-mail address is something like “ron” with no @ ) the following error is displayed:
>
> Warning: checkdnsrr() [function.checkdnsrr]: Host and type cannot be empty
>
> Can I suppress this from displaying so *just* my error message displays?

    Sure.

    if (@checkdnsrr($mailDomain,'MX'))

-- 
</Daniel P. Brown>
Dedicated Servers, Cloud and Cloud Hybrid Solutions, VPS, Hosting
(866-) 725-4321
http://www.parasane.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux