in reply to POST vs GET & their intermingling.
If you are using CGI.pm and need to use a POST but still have a query string embedded in the URL, open CGI.pm and look for the following:
As a general rule of thumb, use GET when you *get* information from a server without changing it. Use POST when you *post* information to a server and thus change it. That's why we have two methods.# Some people want to have their cake and eat it too! # Uncomment this line to have the contents of the query string # APPENDED to the POST data. # $query_string .= (length($query_string) ? '&' : '') . $ENV{'QU +ERY_STRING'} if defined $ENV{'QUERY_STRING'};
If you must mix and match methods, make sure that you don't use GET when you alter data on the server! Since browsers generally do not prompt on reload for a GET request, a user could inadvertently refresh a page and post data multiple times. Some browsers still allow this for a POST, but it's less common.
Cheers,
Ovid
Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: (Ovid) Re: POST vs GET & their intermingling.
by Fastolfe (Vicar) on Dec 29, 2000 at 21:56 UTC |