Re: Regular Expressions?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



list_php_general@xxxxxxxxxxxxxxxxxx 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

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux