Hi Sait,

> no characters except for the followings will not be allowed.
> 0-9 a-z A-Z   ~ @ # $ %  ( ) _  - +  =  [ ]  { }  < ? >

if ( ereg("[^0-9a-zA-Z\_\-]", $user_input) ) {
  //invalid char detected
}
else {
  //input contain only allowed char
}

just add all your valid char in the pattern, and dont forget
to escape the char which has special meaning in regex.

--
Jimmy
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Money is what you make it - a servant or a master


-- 
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