Posted by Janwillem Borleffs on 09/30/06 13:52
Cerebral Believer wrote:
> Is this a good ereg statement?
>
The regular expression on itself is fine, but the error is the '$email_1 or
$email_2' condition, which evaluates to '1' or '' before it's compared. You
need to apply the regular expression for each email address seperately.
Also, it's recommended to use the PCRE library instead of the POSIX-based
ereg* functions. See http://www.php.net/pcre for more information.
JW
Navigation:
[Reply to this message]
|