Suppressing error from displaying
| From: | Ron Piggott | Date: | Wed, 24 Nov 2010 19:13:38 +0000 |
| Subject: | Suppressing error from displaying | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-309650@lists.php.net to get a copy of this message | ||
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