Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Egeg

Status
Not open for further replies.

youradds

Programmer
Jun 27, 2001
817
GB
Anyone tell me why this wont workl please?

if (!eregi("^[:alnum:]+@[:alnum:]$", $email[$counting])) { error("The email address you submitted, $email[$counting], does not appear to be valied. Please check."); exit; }

I'm checking for the email validity. I keep getting a false value sent, even when the address is formatted correctly. I'm just guessing my way through reg exps at the moment, so if anyone knows a good tutorisal, that wouldnt be missed either;)


Thanks

Andy
 
This is the one I always use:

if(!eregi("[0-9a-z]([-_.+]?[0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*\\.[a-z]{2,}$", $email)){

I know this works. mcvdmvs
-- "It never hurts to help" -- Eek the Cat
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top