Skip to main content
March 14, 2008
Answered

POST and load variables

  • March 14, 2008
  • 5 replies
  • 587 views
Hi guys,

well I finally jumped into AS3 World as I was working with AS1 and 2 for few years ...
Of course I read some articles about migrating to AS3 and whatnot and here's my problem.
I'm doing a simple sendandload function but somehow my POST doesn't work. If I change the method to GET it works. I tryied to ignore Loader and used "navigateToURL" and the POST works aswell. But if I use "load()" it doesn't.

Thanks for help.
This topic has been closed for replies.
Correct answer
Hi guys,

well I found out the bug. It's in "Firebug" Add-on in Mozilla
The posts allways got through but Firebug wasn't showing them and I displayed a wrong respond form the PHP aswell. I was so desperate that I did the POST in AS 2.0 and found out "it's not working" so I figured there must be something else.

Anyways, I would like to thank to all who took the time to read this and tried to help me.

Best regards, DeMordey

PS: at least I learned a lot from AS3 in last 3 days

5 replies

July 23, 2008
quote:

Originally posted by: vanessalewis
Does this work with Vista ?

Anthony O'Hare

Data Recovery Ink Cartridges Data Recovery

If you mean send and load variables, yes it does work on Vista.
If you mean Firebug showing the requessts, no it still doesn't show them.

-mo
Damon Edwards
Inspiring
March 17, 2008
<?php
$file = $_POST['filename'];
$user = $_POST['user'];
echo $file;
echo $user;
?>
March 17, 2008
quote:

Originally posted by: dzedward
<?php
$file = $_POST['filename'];
$user = $_POST['user'];
echo $file;
echo $user;
?>

print_r($_REQUEST); shows you all variables comming to script => $_GET and $_POST, so it doesn't mather if you use $_POST or $_REQUEST.

UPDATE: Found out it works in Flex but still not running in Flash.
Correct answer
March 18, 2008
Hi guys,

well I found out the bug. It's in "Firebug" Add-on in Mozilla
The posts allways got through but Firebug wasn't showing them and I displayed a wrong respond form the PHP aswell. I was so desperate that I did the POST in AS 2.0 and found out "it's not working" so I figured there must be something else.

Anyways, I would like to thank to all who took the time to read this and tried to help me.

Best regards, DeMordey

PS: at least I learned a lot from AS3 in last 3 days
Damon Edwards
Inspiring
March 17, 2008
Lets see your php please.
March 17, 2008
Sure ;)

The point is, if I use navigateToURL() I get the POST variables, if I use load() with METHOD.GET I get the GET variables, but if I use load() with POST the PHP doesn't get them ...
March 17, 2008
For seeing what is being transfered, Service Capture works too.

http://kevinlangdon.com/serviceCapture/
Damon Edwards
Inspiring
March 14, 2008
How do you know its not working? Where is your 'sendComplete' function? What is the php supposed to be echoing? Here's a tut. I prepared for sending vars to db and php echoing results.
March 17, 2008
Didn't post sendComplete but it's there. Well in the PHP I got a

print_r($_REQUEST);

so I see all the variables comming to the script and the POST ones arent there. If I change the method to GET I can see them.