I have lot of textarea fields to add comments and quotes. How can I validate these fields. I checked null validation other than null validation what validation I have to do?
+1
A:
Some things you need to check :
empty values
numbers only
input length
email address
strip html tags
Credit : php-mysql-tutorial.com
Babiker
2010-05-26 06:20:17
A:
!empty( $text ) && strlen( $text ) > 123 && !preg_match('/(<[a-z]+>)/', $text )
... and so on...
Tobias
2010-05-26 06:50:05