RE: [PHP-DB] Text corruption when storing to MySql
| From: | Bastien Koert | Date: | Wed, 20 Oct 2004 20:33:44 +0000 |
| Subject: | RE: [PHP-DB] Text corruption when storing to MySql | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-36940@lists.php.net to get a copy of this message | ||
check both single and double quotes replace them with ('') and ("") respectively, try mysql_real_escape_string() functions
bastien
From: "Gaby T." <kpqx6rw02@sneakemail.com> To: php-db@lists.php.net Subject: [PHP-DB] Text corruption when storing to MySql Date: Wed, 20 Oct 2004 12:49:51 -0700 I am running into a problem where as I want to store test form a text field to a database (MySql in this case, sql type "text"). Apparently, if people are cutting and pasting text from another document (typically MS WORD) into the textfield, the text gets only partially saved. I am assuming wierd characters are being introduced in this manner (I definitively know this is a problem with rounded quotes) and although I am using the basic "addslashes" function, it's not enough. Has anyone seen this before and is there a fix? Thanx Gaby -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php