PDA

View Full Version : The difference between POST and GET


gezi
12-02-2005, 03:06 AM
I read on the documentation of loadVars about this last parameter that could be either GET or POST and so, together with the written word, I was sure that this is the GET and POST I know from html forms.

In other words, when using POST my parameter arrive in a php script in my $_POST array, and that when using GET the parameter would be added to the URL and arrive in $_GET.

But apparently not so, whatever I use in loadVars, I always get them through the URL and into the $_GET array.

Am I misunderstanding something here because I can't really see what the difference between the two is and I would really like a lot better to do the real <FORM> type of POST, I don't like that stuff on the URL.

Anybody with some insight?

thanks
Gunter

CyanBlue
12-02-2005, 03:22 AM
Howdy and Welcome... :)

I am 99% sure that you were testing it from within the Flash IDE and PHP script was receiving the GET variables... Read on if that is the case... If not, don't spend any more time on my reply... :)

If you call PHP script from the Flash, Flash simulates the function of the web browser and it can only perform GET operation whether you specify POST or not... Hence PHP is only receiving GET variables...

The lesson of this is that Flash is only 'simulating' the web browser and it might not be exactly what you are expecting when run in the web browser... So, you do need to test your movie over the web browser specially if you are trying to connect to other technologies... ;)

Flash Gordon
12-02-2005, 05:32 AM
Another way to look at it $_GET[] is in the address bar such as ?variable=value where $_POST gets passed behinde the scenes

gezi
12-02-2005, 07:18 AM
Hi CyanBlue,

You made my blues go away - thank you so much!
You were right on, when I ran this stuff on a real web server it worked as it's supposed to.

It would be so easy to mention that in the manuals, wouldn't it - would have saved me hours.

Thanks again,
Gunter

CyanBlue
12-02-2005, 02:09 PM
That's why we are here for... ;)

senocular
12-02-2005, 02:26 PM
That's why we are here for... ;)
You mean either "That's why we are here" or "That's what we are here for" right? ;)

CyanBlue
12-02-2005, 02:35 PM
You got so bored and now picking my bad English??? :p

senocular
12-02-2005, 02:40 PM
Yeah, pretty much heh

Flash Gordon
12-02-2005, 07:13 PM
Better your English than my coding :)

tg
12-02-2005, 08:20 PM
Better your English than my coding :)

or do you mean 'your english better than my coding'.... hmmmmm....