working with ' in SQL
| From: | Adam Williams | Date: | Thu, 04 Mar 2004 15:30:32 +0000 |
| Subject: | working with ' in SQL | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-33304@lists.php.net to get a copy of this message | ||
Hi, I have an SQL statement that is ran when data is submitted through a
form. When someone types in a word with an ' such as farmer's the SQL
statement fails. I tried $_POST[data] = addslashes($_POST[data]); before
executing the SQL statement, but the statement still fails. any
suggestions? using words without a ' works fine.