PHP values to combobox

How can I load values from php fail to combobox (----> Labels)?

Howdy and Welcome…

I don’t understand what you are trying to do…

Do you have a PHP script that returns data back to Flash???

Yes I have this script but the problem is that can’t load these values to flash combobox! (But I can load these values to flash textbox).

My script is:

loadVariables(“news2.php”, this);
for (i=0; i<12; i++) {
combobox.addItem(php_value);
}

Load what you need from the PHP script to the Flash variable first and then assign them to the combobox…

I am novice, how can I do this?

Can you show me the exact code you have??? I don’t think what you have showed me is all… I also want to see the PHP code… :wink:

news2.php code:

$php_value= “Text”;
echo “&php_value=” . urlencode($php_value);

and flash code:

loadVariables(“news2.php”, this);
for (i=0; i<12; i++){
combobox.additem(php_value);
}

Howdy…

Try this…

myLVs = new LoadVars();
myLVs.load("delMe.php?uniqueID=" + getTimer());
myLVs.onLoad = function(success)
{
	for (i = 0 ; i < 12 ; i++)
	{
		combobox.additem(myLVs.php_value);
	}
}

Oops… Forgot the file… :wink:

Thank you very much! It works perfectly…:slight_smile: But I have one question… Why ?uniqueID= is necassary?

That’s there to ensure that the PHP script is not loaded from the cache… Know what I mean??? :wink:

Yes I understand, thanks!

My pleasure… :wink: