How to pull this from db

Discussion in 'PHP' started by x0x, Oct 5, 2008.

  1. #1
    <?
    include("includes2445.php");

    $emails = mysql_query("SELECT email FROM users where id >0;");
    echo mysql_error();
    while ($newemails = mysql_fetch_array($emails))
    {

    $regexp = "/^([a-zA-Z0-9])+([a-zA-Z0-9\._-])*@([a-zA-Z0-9_-])+([a-zA-Z0-9\._-]+)+$/";
    $humm= (!eregi($regexp, $newemails));

    echo "<br>$hummis not correct";

    }

    ?>


    Why doesn't that work? I want to echo emails that don't match the regexp
     
    x0x, Oct 5, 2008 IP
  2. x0x

    x0x Well-Known Member

    Messages:
    510
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    110
    #2
    ignoreeeeeee
     
    x0x, Oct 5, 2008 IP