all groups > flash actionscript > february 2006 >
You're in the

flash actionscript

group:

Posting variable to a different server


Posting variable to a different server Elena Blanco
2/27/2006 8:49:10 PM
flash actionscript: I am using the following code:
__email.sendAndLoad(__spamURL, __email, "POST");

to post form values to a php page that lives on a different server (and url)
that the swf that is sending the values.

If I publish the swf locally the values are sent (and then stored properly by
the php code in the database). But the swf on the server is not working.

I have the crossdomain.xml on the server where the swf lives, as well as the
follwoing code in the fla:

System.security.allowInsecureDomain("*");
System.security.allowDomain("*");

What am I missing? Why is it not working?

Thank you
Re: Posting variable to a different server blemmo
2/28/2006 12:45:45 AM
Maybe this is senseless, but did you check that the php page really takes POST
input? The Flash Help states that LoadVars.send() always uses the GET method
when run inside Flash... I don't know if it's the same for sendAndLoad(), but
probably you're sending via GET locally when the php is working. I made this
mistake once and had a hard time finding out what's wrong...

hth,
blemmo
AddThis Social Bookmark Button