• Subject: Re: Mixing GET and POST Methods
  • From: Loyd Goodbar <lgoodbar@xxxxxxxxxxxxxx>
  • Date: Fri, 27 Jul 2001 21:48:18 -0500

You can mix GET and POST on the same page, but not on the same *request*. You
may either use GET *or* POST on a single request.

You can have a single page with:
<image>action=myprogram method=get data=hello
<form>action=myprogram method=post data=hi
<a href>action=myprogram method=get data=howdy
<button>action=myprogram method=post data=heythere

You cannot have a request like:
action=myprogram method=post data=hello method=get data2=hi

If you had a page with:
method = get: value = 1
method = post: value = 3
cookie: value = 5

Which would your RPG program choose? Would you choose the same way all the
time? Programs (such as CGIDEV2 and PHP in *nix) that can handle these methods
use either the first method specified or transparently "pick one" first, and
use it. You cannot know which that CGIDEV2 would pick without looking at the
source. You can configure PHP to (for example) use cookies first, then post,
then get. But you still must pick one and stick with it for that request.

Please note I am saying "request", not "page".

You can have a page that has distinct GET requests and POST requests to the
same program (see above), if you're set up to handle that. But you cannot have
a single request that uses both.

Loyd

On Fri, 27 Jul 2001 15:54:14 -0400, "Christopher A. Libby"
<clibby@mainepublicservice.com> wrote:

>As a side note, I tried two tests.  I first changed the form method to GET
>and included a hidden field (func) in the form.  The program worked as
>expected.  Second, with the new form I changed the method back to POST.  The
>program again worked as expected.  Can I just not mix GET and POST in the
>same web page?
>
>-Chris

--  
"The killer doesn't see the world like everyone else."
"How does he see it?" "Differently." --Millennium
lgoodbar@ispchannel.com  ICQ#504581  http://lgoodbar2.pointclark.net/
+---
| This is the WEB400 Mailing List!
| To submit a new message, send your mail to WEB400@midrange.com.
| To subscribe to this list send email to WEB400-SUB@midrange.com.
| To unsubscribe from this list send email to WEB400-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.