i have the following code trying to validate an email address...
if ((strlen($email)>=5)&&(strlen($email)<50)){ //min length 5 and max length 50
[color=red]if ((!eregi("^[www]{3}",$email))||(!eregi("\@setroPETS\.com$",$email))){[/color]
//the above denies emails starts with 'www' or denies emails with endings 'setroPETS.com'
//to prevent useless emails from being entered
if (!eregi("([A-Za-z0-9]){4,15}$", $email)){ //prevent emails with 'aaaaaa' or '888888'
if (eregi("^[a-zA-Z0-9\.\_]+@[a-zA-Z0-9]+\.[a-zA-Z0-9\.]{2,4}$", $email)){
The problem is in the line that is trying to check for emails starting with 'www'. I am trying to prevent emails with www in the username to prevent useless email addresses from clodding the db?
Currently it does allow something like www.bob@bob.com...
any ideas as to what i got wrong?