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" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to