function ok_mail($mail){

if (!preg_match("/^[a-zA-Z0-9._-]+@[gmail,hotmail.yahoo]+.[com,net,org,tv]{2,5}$/", $mail)){

exit("this not mail");

}

}