Page 1 of 1

can i send Both GET and POST data at same time

Posted: Thu Jul 30, 2009 5:47 am
by lokesh_kumar_s
hi is it possible to send both GET and POST data at the same time please help.

Re: can i send Both GET and POST data at same time

Posted: Thu Jul 30, 2009 5:51 am
by VladSun
Yes.

Code: Select all

<form action="mypage.php?GET_DATA_GOES HERE">POST_DATA_GOES_HERE (use form fields ofcourse : )</form>

Re: can i send Both GET and POST data at same time

Posted: Thu Jul 30, 2009 6:05 am
by Darhazer
VladSun wrote:Yes.

Code: Select all

<form action="mypage.php?GET_DATA_GOES HERE">POST_DATA_GOES_HERE (use form fields ofcourse : )</form>
<form action="mypage.php?GET_DATA_GOES_HERE" method="POST">

The default method is GET ;-)

And yes, you can, as the GET data is added to the path...

Code: Select all

POST /mypage.php?someval=1&someval=2 HTTP/1.1
Host: example.com
Content-length: someValue
Content-type: application/x-www-form-urlencoded
Connection: close
 
somepostvariable=somepostvalue

Re: can i send Both GET and POST data at same time

Posted: Thu Jul 30, 2009 7:00 am
by VladSun
Darhazer wrote: <form action="mypage.php?GET_DATA_GOES_HERE" method="POST">

The default method is GET ;-)
I stand corrected :)