Posted by Juliette on 08/20/06 21:07
Davide wrote:
> Hi all.
>
> I'm writing a form which only these characters are alloved "a-z 0-9 -
> ."
> what function help me to do this?
>
> really thanx!
>
When you've received the data validate it with preg_match, something
like this (untested):
if( preg_match( '/^[\.a-zA-Z0-9- ]+$/', $value ) === 1 ) {
// data is valid
}
else {
// data is invalid
}
Navigation:
[Reply to this message]
|