I have problems to validate an email adress using preg_match().
This is the block of code i have.
if (VerifierAdresseMail($email))
echo '<p>valide.</p>';
else
echo '<p>not valid</p>';
function VerifierAdresseMail($adresse) {
$Syntaxe = '#^[\w.-]+@[\w.-]+\.[a-zA-Z]{2,6}$#';
if (preg_match($Syntaxe, $adresse))
return true;
else
return false;
}
this does not seem to work. it's just returning a white page. I can't see the error althought i have this in my application.ini
[developpement : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1
phpSettings.track_errors = 1
phpSettings.error_reporting = E_ALL
resources.frontController.params.displayExceptions = 1
phpSettings.date.timezone = "Europe/Paris"
Thanks for your help