Posted by John Nichel on 04/09/05 05:35
list_php_general@controlaircorp.com wrote:
<snip>
> Joe's Crabshack
>
> The ' apostrophe or " can cause an early truncation of the data. My code thinks that the closing identifier is after the word Joe and the rest of the input is lost. Further, if the data does get by and it could possibly break a SQL statement.
>
> Am I right in thinking the solution in this matter is using regular expressions? If so, where is a good resource to polish my skills?
>
> What about turning off/on magic quotes?
>
> John
>
No need for a regex. Use something like mysql_escape_string() or
addslashes(). That's what these functions are made for.
The Camel book is a good place to start your regex learning.
--
By-Tor.com
....it's all about the Rush
http://www.by-tor.com
Navigation:
[Reply to this message]
|