What's wrong with the following regular expression? As far as I can se,
only alphabetic characters including the special swedish ones, should be
let through, but whatever character passed on in $_REQUEST['f_name'] passes
the test?
if(!ereg("(^[a-zA-ZåÅäÄöÖ]{4,20})", $_REQUEST['f_name'])) {
error("Your first name should be between 4 and 20 alphabetic characters");
}
The next one, used to check valid birthday dates, work. And I can't see
where they differ!
if(!ereg("([0-9]{4})-([0-9]{2})-([0-9]{2})", $_REQUEST['birthday']))
Br,
Anders
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
- Re: [PHP] ereg. Anders Thoresson
- Re: [PHP] ereg. Wico de Leeuw
- Re: [PHP] ereg. Wico de Leeuw
- Re: [PHP] ereg. 1LT John W. Holmes
- Re: [PHP] ereg. liljim