-
Forms and databases
I'm trying to send data to a database on a different server. It works when I test my swf locally, but when i upload on the web, it doesn't work. Any suggestions why? I'm using this to send the data...
on (release) {
// Now import the variables we
// need to send in this movie clip
first_name = _parent.firstName.text;
last_name = _parent.lastName.text;
address1 = _parent.address1.text;
address2 = _parent.address2.text;
city = _parent.city.text;
state = _parent.state.text;
zip = _parent.zip.text;
email = _parent.email.text;
// all the vars we just imported
// will be sent via POST method now
loadVariables("http://www.myphp.php", this, "POST");
// the server...
this.onData = function() {
for (var a in this) {
trace([a, this[a]]);
}
// ok, next frame which has a thanks screen
_parent.nextFrame();
if (this.output == 'sent') {
// in case of success
_parent.errTitle = "Thank You.";
_parent.errType = "Your message has been succesfully sent.";
} else {
// else
_parent.errTitle = "Error!";
_parent.errType = "Attention, an error occurred while processing your message. Please try again later.";
}
};
}
-
Untitled-1.fla
If you are trying to read/send data to a server other than the one the flash movie is located on you need to define a cross-domain policy file:
http://www.macromedia.com/support/fl...s_security.htm
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|