PHP Gurus, I have an eregi() function that I'm using to validate emails that users enter into a form. I pretty much took it directly from the book "PHP and MySQL Web Development". It looks like this: (!eregi('[EMAIL PROTECTED]', $email) For the most part it's working fine. But recently a user tried to enter in his email address and it got rejected by this script. After a little experimentation, it looks like it's the hyphen in the first part of his address that's causing it to be rejected. His email address looks like: [EMAIL PROTECTED] If I remove the hyphen, like so: [EMAIL PROTECTED] Then it passes. Looking at my eregi() function, I've included hyphens as a valid character, and escaped them out with slashes in order that they work within the square brackets. Why would this email be rejected?
-- Cheers! Dave G [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php