Answers for "check email value in php"

PHP
4

how to validate an email field using php

<?php
   $email = "[email protected]";
   // Validate email
   if (filter_var($email, FILTER_VALIDATE_EMAIL)) {
      echo("$email is a valid email address");
   }
   else{
      echo("$email is not a valid email address");
   }
?>
Posted by: Guest on July-28-2020
4

check mail php

filter_var($email, FILTER_VALIDATE_EMAIL)
Posted by: Guest on March-07-2020
0

php check if string email

<?php
    if(filter_var("[email protected]", FILTER_VALIDATE_EMAIL)) {
        // valid address
    }
    else {
        // invalid address
    }
?>
Posted by: Guest on July-28-2021

Browse Popular Code Answers by Language