Validate Textarea to accept only characters no special symbols or numbers.
Dear all,
Greetings,
I have been scratching my mind for couple of times to know how could i restrict a textarea to only accept character's A-Z. No special symbols like @#!| and numbers are allowed. When i give them it should be throw me an error message.
I tried few jquery implementations. But nothing works for me as i m not aware how to apply them.
HTML5 sure is neat.
But you still cannot trust it. That assumes that an HTML form is used and obeys the pattern. Its pretty much the same with a preg_match though.
Where $content is the string.
You can also use ctype_alpha which is also just a-z case insensitive.
__________________
As of PHP 5.5, the MySQL library has been officially deprecated. It is recommended to move to either MySQLi or PDO libraries for your mysql connectivity. See here for help choosing which interface you prefer: http://php.net/manual/en/mysqlinfo.api.choosing.php