You are here: Re: [PHP] Easier way to clean GET Variables ? « PHP « IT news, forums, messages
Re: [PHP] Easier way to clean GET Variables ?

Posted by Chris Shiflett on 08/26/05 05:54

Graham Anderson wrote:
> Is there a way to loop thru all of these GET requests by:
> putting the GET variables into an array
> processing the variable strings with trim/striptags/etc in a loop
> exploding the variables back out into separate variables
>
> otherwise this gets a bit tedious

Proper filtering is necessarily tedious. There is no way to filter a
last name, a server name, a file name, an IP address, a ZIP code, and a
comment with the same function. Those who try wind up creating a "lowest
common denominator" filtering function, or they confuse filtering with
escaping (as demonstrated by some of the replies).

As a good friend of mine likes to say, you have to get your hands dirty.

Hope that helps.

Chris

--
Chris Shiflett
Brain Bulb, The PHP Consultancy
http://brainbulb.com/

 

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

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