当前位置:Gxlcms > PHP教程 > php验证邮箱格式

php验证邮箱格式

时间:2021-07-01 10:21:17 帮助过:3人阅读

  1. if(isset($_POST['email'])){
  2. $email = $_POST['email'];
  3. if(filter_var($email, FILTER_VALIDATE_EMAIL)){
  4. echo '

    This is a valid email.

    ';

  5. }else{
  6. echo '

    This is an invalid email.

    ';
  7. }
  8. }
  9. ?>

php

人气教程排行