Hello All, I can’t seem to figure this out nor can I find an example of how to insert the value of a combobox to a database. In my AS3 file I am attempting to create a login system. I am using text input and combobox components.
I want the user to select a value from the combobox then send this value off to the database. How do I do this? Is it the same procedure has using the text input?
The two combo boxes have the instance names
cbox_Age and cbox_From
This is part of my code below: it be too long too show you it in full. Can you please carefully take a look at the code and if you can identify were I might be going wrong. I would appreciate if you could reply and explain.
Thank You
var phpVars:URLVariables = new URLVariables();
var sendURL:URLRequest = new URLRequest(“myPhpFile”);
sendURL.method = URLRequestMethod.Post;
sendURL.data = phpvars;
var phpLoader:URLLoader = new URLLoader();
phpLoader.dataformat = URLLoaderDataformat.VARIABLES;
phpLoader.addEventListener(Event.COMPLETE, showResult);
//create the variable to send to the php file
//variables from text input
phpVars.email = email.text;
phpVars.password = password.txt;
phpVars.confirm_pswd = confirm_pswd.txt;
//variables from combobox
phpVars.cbox_age = age_txt;
phpVars.cbox_location = location_txt;
//this will start communication between flash and
php
phpVars.systemcall = “checklogin”;
phpLoader.load(sendURL);
function show result(event:Event):void{
result_txt.text = event.target.data;