FILTER_VALIDATE_EMAIL не возвращает False [закрыто]Php

Кемеровские программисты php общаются здесь
Гость
FILTER_VALIDATE_EMAIL не возвращает False [закрыто]

Сообщение Гость »


I'm trying this code :

if(!empty(!$_POST["email"], FILTER_VALIDATE_EMAIL) { die ( "Invalid email" ) } Normally it should return False when an invalid mail address is typed ? When I enter a broken email address, I don't enter in the if(!empty...) so there's no error message sent to the user.

But when the email address is correct it's working because in xampp the mail is properly added .

I'm on Php 8.2.12 on windows 10.

So I would know if it's a common problem that can be fixed, or will I have to find another way to check if the email address is not wrong ?

Thanks


Источник: https://stackoverflow.com/questions/780 ... turn-false

Вернуться в «Php»