You are here: Re: valid chararcters « PHP Programming Language « IT news, forums, messages
Re: valid chararcters

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация