Topic: "POSTing formdata" (page 1 of 1)

1
Author Post
Domoran
groupmastergroupmastergroupmastergroupmaster
Hi all,

i have a question about POSTing formdata to PHP Scripts.
I know the usual URLencoding like
?blah=blah&blub=blub ... and that worked fine for PHP 1,2,3 . When I try that at PHP 5 it doesn\'t work for me. Maybe I am doing something wrong this time.

I had the same problem at another website\'s php script where I had to write some python script, that passed a POST Request to the webserver encoding the Data using MIME standard.

So far the introduction, now my questions/guesses:

Correct? Yes or no:
a) Url-Encoding of formdata passes a GET to the webserver which has a different behavior than POST depending on the script you pass it to?

b) Url-Encoding of formdata does not work always. Sometimes you have to use a POST.

Now two more questions:
1) Is there a faster way to do this, than writing a script in some language?

2) Am I bothering you with longish questions and do you prefere telling me some links with info for that? :)

Thanks for your time,
Domoran
private message EMail
Erik
groupmastergroupmastergroupmastergroupmastergroupmaster
Hello,

a) Yes, because the script can figure out whether the data was posted or passed by get ($HTTP_POST_VARS and $HTTP_GET_VARS for example). The encoding of data can also be different (look at enctype-attribute of the form-tag; but this should not be for interest of the receiving script (decoding is done by PHP as far as I noticed that)).
b) You can pass every data via GET. The Problem is, that GET has a length limitition (it is passed as part of the request-line). With POST, there is no length-limitition for the data.

1. Well, write a Socket-program :-)

I hope I could help you a little bit.

bye Erik
Edited by Erik on 28.03.2003 14:16:46
private message EMail Website

Topic: "POSTing formdata" (page 1 of 1)

1