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

Posted by fabian.sorqvist on 08/21/07 08:23

On 21 Aug, 10:07, "Fabio" <znt.fa...@virgilio.it> wrote:
> "petersprc" <peters...@gmail.com> ha scritto nel messaggionews: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 :(

elseif (count($_GET)> 0) {
echo 'Button get.';}

if you access the url http://www.mysite.com/?submitted=false, then you
have something in your $_GET variable, that's why it displays button
get ^^

 

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

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