Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > Moderated Pro PHP
|
Moderated Pro PHP This is a moderated forum for discussing advanced, professional level issues with PHP. Your posts will not appear until a moderator approves them. Posts that are not the right level for this forum will be responded to and you'll be asked to post them in the [url="http://p2p.wrox.com/sql-server-2000-20/9"]Beginning PHP[/url] forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Moderated Pro PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 4th, 2007, 09:35 PM
Registered User
 
Join Date: Nov 2003
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default Functions working backwards?

I'm not sure why, or maybe I'm tired and confused, but standard functions seem to work backwards for me...
e.g. preg_match() should return True if it finds a match right?
but to get my code to respond properly, I need to use !preg_match() as in: if(!preg_match('/^[a-z0-9]+([_\\.-][a-z0-9]+)*@([a-z0-9]+([\.-][a-z0-9]+)*)+\\.[a-z]{2,}$/i',$mgEmail)){
        list($username,$domain)=split('@',$mgEmail);
        if($domain){
          if(checkdnsrr($domain,'MX')) {
         return FALSE;
          }
    }
      return TRUE;
     }
     return FALSE;
    }

-------------------
And even the checkdnsrr() function, when tested, returns False on valid domains.

Can anyone explain this to me? Is it something in my php set up?
WHY WHY WHY???
Please help and thank you.

The best ideas are not the simple ones, they're the complex ones made easy.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel Worksheet Functions Stop Working Arron Edwards Excel VBA 1 May 13th, 2008 01:12 AM
Backwards compatable XSLT 2.0 boen_robot XSLT 4 October 4th, 2006 03:36 PM
Pear functions is not working vinodkalpaka Pro PHP 2 August 5th, 2005 12:56 AM
Domain name validation - backwards?? rptasiuk Pro PHP 7 July 20th, 2004 04:52 AM
Chapter 6 Array's "Going backwards" mjennings VB.NET 2002/2003 Basics 2 November 19th, 2003 02:18 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.