I just got this from: http://php.net/preg_match

<?php
if(eregi ("^[[:alnum:[EMAIL PROTECTED],6}$", stripslashes(trim($someVar))))
{
  echo "good";
}
else
{
  echo "bad";
}
?>


Hope it works out for you.
 - Nick Stinemates

On Thu, Jan 18, 2007 at 01:40:36PM -0700, Don wrote:
> I'm trying to get this line to validate an email address from a form and it
> isn't working.
> 
> if (ereg("[EMAIL PROTECTED]",$submittedEmail))
> 
>  
> 
> The book I'm referencing has this line
> 
> if (ereg("[EMAIL PROTECTED]",$submittedEmail))
> 
>  
> 
> Anyway.. I welcome any advice as long as it doesn't morph into a political
> debate on ADA standards and poverty in Africa. :-)
> 
>  
> 
> Thanks
> 
>  
> 
> Don
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to