[thelist] Double quotes ("), PHP & MySQL

Jay Blanchard jay.blanchard at niicommunications.com
Wed Aug 21 08:48:20 CDT 2002


[snip]
> You have a directive
> in your php.ini called magic quotes, which usually takes care
> of this. I recommend turning it off and handling all data
> transfers as above.

just out of curiosity, why do you recommend turning off magic_quotes? i
know a number of people who take this route as well. is there any strong
reason, or is it just personal preference?
[/snip]

It's a matter of preference. That way, if I am having a problem with
quotation marks (or any other marks that might need to be escaped) it is in
my code and I know the solution. With magic quotes there can sometimes be a
misinterpretation of what should or should not be escaped. I have seen this
cured with regex, but it seems the long way to go when there are functions
available.

HTH!

Jay

***********************************************************
* Texas PHP Developers Conf  Spring 2003                  *
* T Bar M Resort & Conference Center                      *
* New Braunfels, Texas                                    *
* San Antonio Area PHP Developers Group                   *
* Interested? Contact jay.blanchard at niicommunications.com *
***********************************************************





More information about the thelist mailing list