Date: 11/19/01
- Next message: _lallous: "[PHP] Re: Additional e-mail address in PHP script..."
- Previous message: Thomas Edison Jr.: "RE: [PHP] Resetting ID in mySQL DB"
- In reply to: phantom: "[PHP] Valid Chars Function"
- Next in thread: Jason G.: "Re: [PHP] Valid Chars Function"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
you can use regluar expressions, or single character scanning via for loop,
1)RegExp:
if (ereg('[^a-z0-9]', $name)) print 'error!';
2)For loop
for ($i=0;$i<strlen($name)$;$i++)
if ($name[$i] == '@' || $name[$i]=='!' .. ....) print 'error!';
"Phantom" <phantom <email protected>> wrote in message
news:3BF8B49C.40F54D45 <email protected>
> Anyone know a good PHP function or script to scan a string for Valid
> Characters to make sure something that is not allow is not included in a
> form?
>
> $Name = "#@@##@!#!@" would not be a valid alphabetical name, how do I
> scan for that in PHP? Thanks.
>
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: _lallous: "[PHP] Re: Additional e-mail address in PHP script..."
- Previous message: Thomas Edison Jr.: "RE: [PHP] Resetting ID in mySQL DB"
- In reply to: phantom: "[PHP] Valid Chars Function"
- Next in thread: Jason G.: "Re: [PHP] Valid Chars Function"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

