PDA

View Full Version : Flash to php using sendAndLoad


MartinMonroe
11-07-2005, 09:59 AM
I need help passing form input from Flash to php. The following is the coding on a button in my swf:

on (release) {
simple_lv = new LoadVars();
simple_lv.AddFeedURL = FeedURL_txt.text;
simple_lv.Category = tm.getCurrentMenuName( );
simple_lv.Subcategory = tm.getCurrentMenuName ( );
simple_lv.NewCat = NewCat_txt.text;
simple_lv.NewSubcat = NewSubcat_txt.text;
trace (simple_lv);
simple_lv.onLoad = function(success:Boolean) {
// if the comments were sent to the server and you received a response, clear the form fields and display an Alert message.
if (success) {
FeedURL_txt.text = "";
NewCat_txt.text = "";
NewSubcat_txt.text = "";
Alert.show("Thank you for your submission.", "Success", Alert.OK);
} else {
// else you encountered an error while submitting to the server.
Alert.show("Unable to process your submission at this time.", "Server Error", Alert.OK);
}
};
trace (simple_lv);
simple_lv.sendAndLoad = ("http://rssreader.digitalprof.net/php/changes.php", simple_lv, "POST");

trace (simple_lv)
}

The first trace gives me all 5 inputs correctly. Second trace is onLoad plus all 5 correct inputs. Third trace is POST + OnLaod + all 5 inputs correctly.

In the changes.php file on the server I have a vardump statement. I'm receiving a NULL message when I pull this php file up in my browser, which I think means that none of my name-value pairs are getting to the server?

Can anyone help? Thanks.