Posted By

Michael01 on 01/13/10


Tagged

email valid check validation e-mail berprfen


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

tanathos
jlan
netzwerktourist


E-Mail validation


 / Published in: PHP
 

  1. function check_mail($email){
  2. if(eregi("[A-Za-z0-9\.!#\\$%&'\*+-/=\?\^_`{\|}~]{3,}@[a-z0-9]+([-_\.]?[a-z0-9])*\.[a-z]{2,4}", $email)) return TRUE;
  3. else return FALSE;
  4. }

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: Helbom on January 14, 2010

or you can use filter_var...

function checkmail($email) { return filtervar($email, FILTERVALIDATEEMAIL); }

You need to login to post a comment.