Re: Submiting two forms at the same time

From: Date: Fri, 27 Apr 2001 14:34:37 +0000
Subject: Re: Submiting two forms at the same time
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-50629@lists.php.net to get a copy of this message
As long as you're using the GET variables simply to pass along values (not allowing the user to change the GET variables), you can stick the values in the action property of your POST form and get the same result. So the below code would become: <form action="bla.php?bar=yehaa" method="post"> <input type="hidden" name="foo" value="yahoo"> </form> Hope this helps. (Hello in Goshen...I grew up in Fort Wayne. My pop's a Taylor FW prof...) Reuben D Budiardja wrote: > What I want to do is to > have two forms with different method (GET and POST), and then send them at > one time, so that in the next page I get both $HTTP_POST_VARS and > $HTTP_GET_VARS. To illustrate this: > > <FORM ACTION=3D"bla.php" METHOD=3D"post"> > <INPUT TYPE=3D"hidden" NAME=3D"foo" VALUE=3D"yahoo"> > </FORM> > > <FORM ACTION=3D"bla.php" METHOD=3D"GET"> > <INPUT TYPE=3D"hidden" NAME=3D"bar" VALUE=3D"yehaa"> > </FORM> > > I want so that after submiting these forms, somehow, in the bla.php I=20 > have > $HTTP_POST_VARS["foo"] = "yahoo" > $HTTP_GET_VARS["bar"] = "yehaa" > > at one time. Is this possible at all? John Platte "Truth binds the mind to what satisfies it, but worldly thinking does not satisfy and therefore ignites curiosity." -- St. Theophan the Recluse

« previous php.general (#50629) next »