I have a "contact me" form which allows users to send comments. The form uses three fields: name, email, and comments.
It's the "comments" field I need help with ...
Occasionally I get some junk coming through that contains URL's, or whatnot, and I'd like to filter those things out. (I can't tell if these junk contacts are human or machine generated). Ideally, I want to recognize the content and kill the process, perhaps redirecting the user.
Can this be done w/ preg_match_all ?
I'm trying to disallow chars such as "<", ">", and "@". If those chars show up, then it's not someone I want to contact, or want contacting me.
Further, I'd like the limit the length af any comment to 500 chars to prevent someone froom flooding the data field.
Thanks - Mark