You are here: Re: How to differentiate between POST and GET? « PHP Programming Language « IT news, forums, messages
Re: How to differentiate between POST and GET?

Posted by Kim Andr� Aker� on 06/14/60 12:00

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@NOSPAMbetadome.com
(remove NOSPAM to contact me directly)

 

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

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация