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 Robert Cummings on 08/25/05 16:19

On Thu, 2005-08-25 at 03:14, Richard Lynch wrote:
> On Wed, August 24, 2005 10:06 pm, 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
>
> In addition to what everybody has posted...
>
> I really would recommend that on any given page you have something like:
>
> $_EXPECTED = array('userID', 'playlistName', 'language');
> $_EXPECTED = array_flip($_EXPECTED);


This isn't necessary if you don't import variables, but rather retrieve
them one by one as in the example I showed. Since there you essentially
denote valid input vars by virtue of retrieval rather than automating
the import.

Cheers,
Rob.
--
..------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'

 

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

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