Re: GET doesn't work as POST

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



What I don't understand is why you're getting kind in the first place at all.  
The form you're referring to, I presume, is this one (simplified HTML to 
avoid word wrapping in email):

<form name="find" action="" method="post" style="background-color:#EEEEEE">
<fieldset>
<legend>Regionen suchen mit ...</legend>

<select name="belongstoid" class="small" >
<option value=0 selected>&nbsp;</option>
<option value=1>Verband: Fussballverband Region Zrich (FVRZ)</option>          
</select>

<select name="state" class="mini" >
<option value=0 selected>- Alle -</option>
<option value=canceled>Gel�cht</option>
<option value=registered>Eingetragen</option>
<option value=validated>Gltig</option>
</select>

</fieldset>
</form>

>From that, you shouldn't be submitting a kind variable either way.  All I can 
think of is the PHP_SELF submission, which would include the same GET query 
as you used to get to that page.  I don't recall off hand if PHP_SELF 
includes the full URI or not.  

Try this: 

print_r($_GET);
print_r($_POST);
print_r($_REQUEST);

Yes, you can end up with both a GET and a POST.  (I'm not sure if it's 
technically legal in the HTTP standard, but it can happen in practice, IIRC.)  
My best guess at the moment is that "kind" is ending up in the wrong one 
somehow.


On Saturday 24 February 2007 4:51 am, Otto Wyss wrote:
> On the page
>
> http://www.orpatec.ch/turniere/5erfussball/index.php?page=bvallist.php&kind
>=regions
>
>
> I have a form with method="post" and action="<?PHP $_SERVER['PHP_SELF'];
> ?>". While it works fine this way, as soon as I change the form to
> method="get" it looses the parameter "kind" when I change e.g. the
> second parameter from "-Alle-" to "Gültig". Has anybody an idea why it
> works with POST but not with GET?
>
> <form action="<?PHP $_SERVER['PHP_SELF']; ?>" method="get">
> ...
>   <select name="state" onchange="this.form.submit()">
>
> O. Wyss

-- 
Larry Garfield			AIM: LOLG42
larry@xxxxxxxxxxxxxxxx		ICQ: 6817012

"If nature has made any one thing less susceptible than all others of 
exclusive property, it is the action of the thinking power called an idea, 
which an individual may exclusively possess as long as he keeps it to 
himself; but the moment it is divulged, it forces itself into the possession 
of every one, and the receiver cannot dispossess himself of it."  -- Thomas 
Jefferson

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux