|
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]
|