# How to use the combobox

**URL:** <https://forum.kirupa.com/t/how-to-use-the-combobox/332143>\
**Category:** flash\
**Created:** [February 13, 2014, 8:20pm UTC](https://forum.kirupa.com/t/how-to-use-the-combobox/332143 "2014-02-13T20:20:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![quest20](https://avatars.discourse-cdn.com/v4/letter/q/a87d85/32.png) [@quest20](https://forum.kirupa.com/u/quest20)\
**Post date:** [February 13, 2014, 8:20pm UTC](https://forum.kirupa.com/t/how-to-use-the-combobox/332143/1 "2014-02-13T20:20:05Z")

</div>

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;
