I have a simple HTML form with 2 fields, name and email.
I'm trying to prevent users from submitting invalid names. The only characters allowed are:
- letters
- spaces
- these special characters: àäçéèïöü
I get the name using a php $_REQUEST variable and store it in $name
.
My preg_match is the following preg_match("/^[a-zA-Z àäçéèïöü]+$/", $name)
.
When I test it in my php code, it works.
But when I test it upon my $_REQUEST variable, it doesn't (though it's displayed correctly in the browser).
For example, if my $_REQUEST variable contains "Jeremy", it works, but if it contains "Jérémy", it doesn't.
Thanks for your help.