having trouble sending vars to database(asp)
Hi all, hopefully somebody may be able to help me with a little problem, I am trying to pass variables from flash to a database via asp. Now I know the .asp side of things are working reason being I use the navigateToURL(), which works like a charm, however Im trying to avoid some security issues and avoid it opening up another window. Which brings me to using URLLoader, its getting the variables and "sending them", but Im not getting anything in the database. here is my code for the function.
function sendX(theVar1:String, theVar2:String, theVar3:String, theVar4:String)
{
var url:String = "thewebpage.asp";
var myRequest:URLRequest = new URLRequest(url);
var variables:URLVariables = new URLVariables();
var myLoader:URLLoader = new URLLoader();
variables.userNm = theVar1;
variables.userLoc = theVar2;
variables.usrRating = theVar3;
variables.custType = theVar4;
myRequest.method = URLRequestMethod.POST;
myRequest.data = variables;
try
{
myLoader.load(myRequest);
trace("sucess",variables);
}
catch (e:Error)
{
trace("fail");
}
}
information is being gathered from 3 txt fields and a button all of which are strings. Like I said have no issues getting the vars, just having them show up in the database. This was also done using a fully qualifed url and the partial with no results. I appreciate any feedback, thanks.
Message was edited by: andjelkovich2012
