You are here: Re: [PHP] Magic Quotes « PHP « IT news, forums, messages
Re: [PHP] Magic Quotes

Posted by Richard Lynch on 02/10/05 19:43

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация