Re: How to differentiate between POST and GET?



Martin wrote:

Is there a simple way to tell if a page was submitted as a POST or a
GET?

I have a page that contains a form with multiple submit buttons. If
the page is POSTed, I go through a somewhat complex analysis of what
needs to be done depending on which button was clicked.

On the other hand, if the page was submitted via GET, I simply set
some default values and send it out. I'd like to be able to do this
without having to look for every button only to find out that none
were submitted.

You could try checking the value of $_SERVER["REQUEST_METHOD"].

--
Kim André Akerø
- kimandre@xxxxxxxxxxxxxxxxxx
(remove NOSPAM to contact me directly)
.



Relevant Pages

  • Re: Panic with ugen
    ... Martin wrote: ... This sounds similar to a bug which I fixed earlier in the year ... [multiple calls of USB_SET_CONFIG conflicted with devfs, ... To unsubscribe, ...
    (freebsd-current)
  • Re: Hello. Joining and Group Netiquette
    ... I didn't realise you're also a master of the multiple ... twitchery fingers... ... Martin D. Pay ...
    (rec.arts.anime.misc)
  • Re: Word processors for Mac - the verdict
    ... On 2008-06-03 08:26:16 +0100, Martin S Taylor ... whole iWork package. ... The idea in Numbers of having multiple tables in a single blank page is however simply brilliant. ...
    (uk.comp.sys.mac)
  • Re: cl(bigcap_{1<=q<=infty} L^q) = L^p
    ... Martin wrote: ... (Rudin: Real and Complex Analysis, ... Since Ccbelongs to each L^p, we arrive to your conclusion - this is another possibility for the proof. ...
    (sci.math)
  • Re: select/highlight multiple rows listitems.
    ... >> Basically i've set the selectmode to multiple and want to select ...
    (microsoft.public.dotnet.languages.csharp)