0

Right now all that happens is that it will always say email banned

My code

//email validation
    $email = htmlspecialchars_decode($_POST['email'], ENT_QUOTES);
  $domain_name = substr(strrchr($email, "@"), 1);
    $domainBlock = 'example.org';
    echo "Domain name is : " . $domain_name;

  if ($domain_name = $domainBlock) {
    $error[] = 'Website Down For Maintenance';
  }
Prova
  • 1

1 Answers1

0

You're missing = sign in the last if statement.

It should be

if ($domain_name == $domainBlock) {
    $error[] = 'Website Down For Maintenance';
}
Madbreaks
  • 19,094
  • 7
  • 58
  • 72
Jack Robson
  • 2,184
  • 4
  • 27
  • 50