On Wed, Nov 24, 2010 at 2:13 PM, Ron Piggott
<ron.pigg...@actsministries.org> 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?
>
> Ron
>
> The Verse of the Day
> “Encouragement from God’s Word”
> http://www.TheVerseOfTheDay.info

if ( @checkdnsrr($mailDomain, "MX") ) {

might work.. the @ symbol usually suppresses the error

-- 

Bastien

Cat, the other other white meat

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

Reply via email to