View Full Version : regarding one php code

09-12-2005, 12:43 AM
hello folks,

i'm new member the this forum and i want to ask one question;

i currently using form mailer script (php contact script) but i edited today form mailer php file and founded following code:

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

what is this code? this code secure?

sorry for bad english, but i hope you understand me..

thanks and sincerely.

09-12-2005, 03:42 AM
It just checks to see if the email address enters is in valid email syntax. I am hopeless with regex though, so can't explain what it does exactly and if it's secure or not.