Answers for "CHECK VALID EMAIL FORMAT 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
1

valide email php

$email = "[email protected]";

if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
  $emailErr = "Email invalide";
}
Posted by: Guest on May-11-2020
0

validate correct format email php

$email = $_POST["email"];
if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
  $emailErr = "Invalid email format";
}
Posted by: Guest on February-22-2021

Browse Popular Code Answers by Language