Bad characters in a text field
| From: | Manuel Ochoa | Date: | Fri, 12 Dec 2003 22:26:02 +0000 |
| Subject: | Bad characters in a text field | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-172612@lists.php.net to get a copy of this message | ||
I have a form with a "text area" that when submited, get stored in a "text" type
field of a MySQL database. Occasionaly some of our users copy data from a DOS program and paste it
in the text area which results in unwanted characters getting stored in the text field. What
function can I use to strip out all but valid characters?
For example: I want to allow a-z ,A-Z, 0-9 and some others and strip out everything else.