RE: [PHP-GENERAL] Using eregi to validate a name.

From: Date: Sun, 11 Jun 2000 21:31:39 +0000
Subject: RE: [PHP-GENERAL] Using eregi to validate a name.
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-1569@lists.php.net to get a copy of this message
> I´m using eregi to validate a input, from a input form, where > the users > types > their name, eg. René Müller. > > What i need is a string patter that allows the user to use > all 'normal' > characters like a-z ä é and so on, but not #_: and other special > characters. Try this: $string = strtr($string, '_:;<>,./', '########'); $string = str_replace('#', '', $string); -- Richard Heyes http://www.heyes-computing.net/scripts/

« previous php.general (#1569) next »