validate/sanitize data
| From: | Todd Trent | Date: | Wed, 17 Nov 2004 20:06:55 +0000 |
| Subject: | validate/sanitize data | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-37324@lists.php.net to get a copy of this message | ||
I need to add textarea input into a mysql database. The input can be
anything you would find in normal paragraph text -
[:alnum:][:punct:][:space:]. In this case it is likely that the input could
also include special accent characters (grave, acute, tilde, etc. - ex. é).
Is addslashes enough to reduce security/sql error issues (provided
!get_magic_quotes_gpc())? Or should I try to strip or test for "-- = < >".
This input, due to its size, is obviously not going to be used in a WHERE
clause.
Todd Trent
VP
Hogfish Design
2550 26th Street West
Bradenton, FL 34205
Tel: 941-749-0144
url: www.hogfishdesign.com