You are here: Re: Knowing the form action « PHP Programming Language « IT news, forums, messages
Re: Knowing the form action

Posted by rf on 08/21/07 08:16

"Fabio" <znt.fabio@virgilio.it> wrote in message
news:46ca9d2d$0$17947$4fafbaef@reader1.news.tin.it...
> "petersprc" <petersprc@gmail.com> ha scritto nel messaggio
> news:1187682646.281398.67090@q3g2000prf.googlegroups.com...
>
>> if (isset($_POST['btn'])) {
>> echo 'Button post.';
>> } elseif (isset($_GET['btn'])) {
>> echo 'Button get.';
>> } else {
>> echo 'Page view.';
>> }
>
> mmm... I'm doing something like
>
> if (count($_POST)> 0) {
> echo 'Button post.';
> } elseif (count($_GET)> 0) {
> echo 'Button get.';
> } else {
> echo 'Page view.';
> }
>
> but if I visit
>
> http://www.mysite.com/?submitted=false
>
> I get "Button get." also if I didn't pressed nothing :(

Because that is how get data is sent to the server. Sever side you simply
can not tell. Why do you need to?

--
Richard.

 

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

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