470,815 Members | 1,284 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,815 developers. It's quick & easy.

Post query ending up in $_GET?


I'm not sure if I've overlooked a config option, but the following HTTP
POST request gives an empty $_POST array and $_GET['fred']=42...

HTTP POST /js/test/testRequest.php?fred=42 HTTP/1.1

Pointers, clues?

--
Ian Collins.
Jan 16 '06 #1
2 1030
Ian Collins wrote:
I'm not sure if I've overlooked a config option, but the following
HTTP POST request gives an empty $_POST array and $_GET['fred']=42...

HTTP POST /js/test/testRequest.php?fred=42 HTTP/1.1


Search google for info about the HTTP protocol. A POST request should look
something as follows:

POST /js/test/testRequest.php HTTP/1.1
Host: hostname.com
Content-Type: application/x-www-form-urlencoded
Content-Length: <length of the string 'fred=42'>

fred=42
JW
Jan 16 '06 #2
Janwillem Borleffs wrote:
Ian Collins wrote:
I'm not sure if I've overlooked a config option, but the following
HTTP POST request gives an empty $_POST array and $_GET['fred']=42...

HTTP POST /js/test/testRequest.php?fred=42 HTTP/1.1

Search google for info about the HTTP protocol. A POST request should look
something as follows:

I know what a post looks like, this is simply the output of a packet
sniffer.

Looking further at the packet I can see that the request is indeed
malformed.

--
Ian Collins.
Jan 16 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Mike Cocker | last post: by
4 posts views Thread by Orion | last post: by
6 posts views Thread by brian_mckracken | last post: by
24 posts views Thread by moriman | last post: by
reply views Thread by mihailmihai484 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.