function email_validation($mail){
                    if($mail != ''){
                        if(preg_match("/^[-A-Za-z0-9_]+[-A-Za-z0-9_.]*[@]{1}[-A-Za-z0-9_]+[-A-Za-z0-9_.]*[.]{1}[A-Za-z]{2,5}$/", $mail)){return true; }
                        else{return false; }
                    }else{return false;}
                }

if(email_validation($_POST['account'])){dosomething...}

Leave a comment

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *