You are here: Re: GET and POST « PHP Programming Language « IT news, forums, messages
Re: GET and POST

Posted by Kimmo Laine on 07/31/05 13:39

"John Dunlop" <usenet+2004@john.dunlop.name> kirjoitti
viestissδ:MPG.1d56b4dd384f3b25989705@news.ntlworld.com...
> luke wrote:
>
>> when it comes to forms, i would have put it thus: "if in doubt, use
>> post".
>
> I'm afraid I couldn't go with that either.
>
>> at the very least you gain a cleaner url.
>
> Yes, that can't be denied.
>
>> in other situations get is perfectly suited
>
> I agree, GET is suited to some situations, and you've hit the
> nail on the head: it depends on the situation.
>
> My objection was with the generalisation that you should
> always tend towards POST, no matter the situation, even if it
> is one for which you and I would both agree that GET is best.


I feel that the very essential difference is in the choice of the keywords
GET and POST. It says it all. When you want to simply GET something from the
server, perform a search for example, use get. When you are uploading data,
posting it, then use POST. And why? Because pages accessed via get, for
example a search result, is a page that can be cached and user may come back
to it if the first search result did not satisfy. If it was posted, the form
would be resubmitted and regenerated, and at least certain browsers will
warn if you are trying to resubmit a posted page. This is the method basicly
what I use as a rule, besides my one-hand-rule: if it has five fields or
less, use GET.

Also: when user is posting some data to server, one submitted via post is
more difficult to tampered, so it is also a security issue. Not fool proof
though.

--
Soulman <eternal.erectionN0@5P4Mgmail.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

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация