Re: Magic Quotes

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

 



Ben Edwards (lists) wrote:
> Am I correct in thinking Magic Quotes automatically adds quotes to all
> posted variables, therefore if you are displaying post variables on a
> form you have to remove the quotes.  They are only needed if you are
> actually inserting/updating into the database.   Whether magic quotes
> are on or not you do not actually have to do anything to data fetched
> from the database. If magic quoted are not on you have to add slashes
> before you add to the database.

To be pedantic, I'll add to this thread and point out that Magic Quotes
also affects GET data.

Oooh, and COOKIES too, almost for sure, though I never put anything in a
Cookie that needs quotes, so I'm not 100% sure on that.

Magic Quotes was part of the original PHP, I think, or at least real early
on, back when the Internet had a lot less vandals.

I daresay validation in those days was more about being nice to the user
and having Good Data than self-defense.

[Sigh.]

When I was your age... :-)

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
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