You are here: Re: [PHP] $_REQUEST or $_POST? « PHP « IT news, forums, messages
Re: [PHP] $_REQUEST or $_POST?

Posted by Chris Shiflett on 01/17/05 17:17

--- gustav@varupiraten.se wrote:
> I've learned to use $_REQUEST but it seems to me that it uses any
> $_GEt, or $_POST. Is it better to $_POST when I'm just using
> $_POST? It seems like that if I want "good code", but I mean is it
> faster with $_POST?

It's not faster, but it is a better practice. It is also particularly
helpful for avoiding certain types of common attacks, because it allows
(forces, actually) you to keep up with the exact origin of data.

This is also important in adhering to the HTTP specification which states
that GET requests should not perform any action other than retrieval.

Hope that helps.

Chris

=====
Chris Shiflett - http://shiflett.org/

PHP Security - O'Reilly HTTP Developer's Handbook - Sams
Coming Soon http://httphandbook.org/

 

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

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