Re: what's wrong with this ereg?

From: Date: Tue, 20 Aug 2002 17:28:46 +0000
Subject: Re: what's wrong with this ereg?
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-21254@lists.php.net to get a copy of this message
Well, one thing is you've got mismatched parentheses. You need another another opening paren right after the "if". Also, don't you need to escape the last hyphen in your character sets? As well as the . before the third character set? -Steve On Tuesday, August 20, 2002, at 11:11 AM, chip.wiegand@simrad.com wrote:
I am trying an email verification function, like this:
     if (empty($useremail)) || !eregi("^[A-Za-z0-9\_-]+@[A-Za-z0-9\_-]
+.[A-Za-z0-9\_-]+.*", $email))
          {
               $errmsg .= "The email address appears to be invalid\n";
          }
But it will not work, on one server I get this error: Parse error: parse error in /home/virtual/site109/fst/var/www/html/auth_dealers/user_input2.php on line 70 and on another server I get this error: Parse error: parse error, unexpected T_BOOLEAN_OR in /usr/local/apache/htdocs/auth_dealers/user_input2.php on line 70 What do I need to do to fix this? -- Chip Wiegand Computer Services Simrad, Inc www.simradusa.com chip.wiegand@simrad.com "There is no reason anyone would want a computer in their home."
     --Ken Olson, president, chairman and founder of Digital Equipment
Corporation, 1977 (They why do I have 9? Somebody help me!) -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.db (#21254) next »