Menu
Which method should I be using for my forms? Why?
[B]$_GET:[/B] Look up a word in an online dictionary.
[B]$POST:[/B] Order a new Mercedes Benz.
[/QUOTE]
another issue is size limit.According to the RFC for HTTP 1.1 there is no size limit for either. The only condition is that servers should be able to understand any query string that they may server.
GET size limit is around 2000 characters. (different on every client)
POST limit is around 2 Mega.[/QUOTE]
I think it depends more on what the action of the form is. If the action supports POST then use POST. If it doesn't support POST (eg. HTML page) then use GET.[/QUOTE]I find this answer very strange. I take it by [I]action [/I] you mean <form [I]action[/I]="***"> i.e. the recieving script. The form and the script that handles the form are normally a pair so obviously the writer of the form and script is going to use the same method for both ends of the connection otherwise data transfer would be impossible.
According to the RFC for HTTP 1.1 there is no size limit for either. The only condition is that servers should be able to understand any query string that they may server.[/quote]There is no limit in 1.1, but IE has a limit to its address bar length (and any address retrieval really) where it can't handle over 2000 characters.
I stand by my answer above: $_GET is for pure data retrival and $_POST is used for everything else.[URL=http://www.w3.org/TR/REC-html40/interact/forms.html#h-17.13.1]W3C (forms) [/URL] seems to agree with this viewpoint.[/QUOTE]
IE has a limit to its address bar length[/QUOTE]Well it's not the only area it doesn't follow web standards. Have you seen how badly it renders the
you're right saying that GET size limit is not according standard but it is because of bad implementation of some clients.Are you trying to suggest that a 2000 character query string might necessary for simple data retrival? Can you give an example?
so what do you suggest?
To ignore clients that do not meet standards?
I can do that on my family web site, but not on a commercial site where you want to serve all users no matter what browsers they are using.
POST will save you some of the headache.
Of course you have plenty left ?[/QUOTE]
0.1.9 — BETA 5.18