# 3 combos 3 variables 3 conditions in php sql query

**URL:** <https://forum.kirupa.com/t/3-combos-3-variables-3-conditions-in-php-sql-query/223603>\
**Category:** flash\
**Created:** [April 24, 2007, 9:42am UTC](https://forum.kirupa.com/t/3-combos-3-variables-3-conditions-in-php-sql-query/223603 "2007-04-24T09:42:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mazzamuz](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/mazzamuz/32/2650_2.png) [@mazzamuz](https://forum.kirupa.com/u/mazzamuz)\
**Post date:** [April 24, 2007, 9:42am UTC](https://forum.kirupa.com/t/3-combos-3-variables-3-conditions-in-php-sql-query/223603/1 "2007-04-24T09:42:30Z")

</div>

hello  
I am nearing the end of a rather complex swf. attached fla(zipped)  
The though process is the user selects values from 3 comboboxes each populated by an XML Connector

Either on the change event or on clicking a button a URL is sent to a PHP page with the three selected values. these three selected values determine a SQL query which intern populates a datagrid. on selecting a row in the datagrid labels are populated. its a modification on the adobe business directory. [http://www.adobe.com/devnet/flash/ar…xmlphp\_06.html](http://www.adobe.com/devnet/flash/articles/flash_xmlphp_06.html)

ALL is working hunky dory except the first step of selecting and allocating the 3 variables to the datagrids xml connector.  
so far ive got the code: in a mc called get position.

price\_xml.trigger();  
publication\_xml.trigger();  
flight\_xml.trigger();

pricecomboFunction = new Object();  
pricecomboFunction.change = function (evt){

[//evt.target.selectedItem.label](https://evt.target.selectedItem.label);  
drop\_selection.htmlText = (“You selected \<b\>”+evt.target.selectedItem.label+"\</b\>");  
trace(evt.target.selectedItem.label);  
set(price, evt.target.selectedItem.label);

\_root.business\_mc.position\_xml.trigger();  
\_root.details\_mc.picture\_imp\_dir.load("");  
\_root.details\_mc.template\_imp\_dir.text = “”;  
\_root.details\_mc.Positionintemplate\_imp\_dir.text = “”;  
\_root.details\_mc.Size\_imp\_dir.text = “”;  
\_root.details\_mc.Images\_imp\_dir.text = “”;  
\_root.details\_mc.ImageSize\_imp\_dir.text = “”;  
\_root.details\_mc.NoOfDesc\_imp\_dir.text = “”;  
\_root.details\_mc.NoOfSlogans\_imp\_dir.text = “”;  
\_root.details\_mc.ContactDetails\_imp\_dir.text = “”;  
\_root.details\_mc.Address\_imp\_dir.text = “”;  
\_root.details\_mc.AuctionDate\_imp\_dir.text = “”;  
\_root.details\_mc.Importance\_imp\_dir.text = “”;  
\_root.details\_mc.Advert\_Price\_imp\_dir.text = “”;  
\_root.details\_mc.Pty\_Price\_imp\_dir.text = “”;  
}  
price\_cb.addEventListener(“change”, pricecomboFunction);

publicationcomboFunction = new Object();  
publicationcomboFunction.change = function (publication){  
drop\_selection.htmlText = (“You selected \<b\>”+publication.target.selectedItem.label+"\</b\>");  
trace(publication.target.selectedItem.label);  
set(publication, publication.target.selectedItem.label);

\_root.details\_mc.picture\_imp\_dir.load("");  
\_root.details\_mc.template\_imp\_dir.text = “”;  
\_root.details\_mc.Positionintemplate\_imp\_dir.text = “”;  
\_root.details\_mc.Size\_imp\_dir.text = “”;  
\_root.details\_mc.Images\_imp\_dir.text = “”;  
\_root.details\_mc.ImageSize\_imp\_dir.text = “”;  
\_root.details\_mc.NoOfDesc\_imp\_dir.text = “”;  
\_root.details\_mc.NoOfSlogans\_imp\_dir.text = “”;  
\_root.details\_mc.ContactDetails\_imp\_dir.text = “”;  
\_root.details\_mc.Address\_imp\_dir.text = “”;  
\_root.details\_mc.AuctionDate\_imp\_dir.text = “”;  
\_root.details\_mc.Importance\_imp\_dir.text = “”;  
\_root.details\_mc.Advert\_Price\_imp\_dir.text = “”;  
\_root.details\_mc.Pty\_Price\_imp\_dir.text = “”;  
}  
publication\_cb.addEventListener(“change”, publicationcomboFunction);

flightcomboFunction = new Object();  
flightcomboFunction.change = function (flight){  
drop\_selection.htmlText = (“You selected \<b\>”+flight.target.selectedItem.label+"\</b\>");  
trace(flight.target.selectedItem.label);  
set(flight, flight.target.selectedItem.label);

\_root.details\_mc.picture\_imp\_dir.load("");  
\_root.details\_mc.template\_imp\_dir.text = “”;  
\_root.details\_mc.Positionintemplate\_imp\_dir.text = “”;  
\_root.details\_mc.Size\_imp\_dir.text = “”;  
\_root.details\_mc.Images\_imp\_dir.text = “”;  
\_root.details\_mc.ImageSize\_imp\_dir.text = “”;  
\_root.details\_mc.NoOfDesc\_imp\_dir.text = “”;  
\_root.details\_mc.NoOfSlogans\_imp\_dir.text = “”;  
\_root.details\_mc.ContactDetails\_imp\_dir.text = “”;  
\_root.details\_mc.Address\_imp\_dir.text = “”;  
\_root.details\_mc.AuctionDate\_imp\_dir.text = “”;  
\_root.details\_mc.Importance\_imp\_dir.text = “”;  
\_root.details\_mc.Advert\_Price\_imp\_dir.text = “”;  
\_root.details\_mc.Pty\_Price\_imp\_dir.text = “”;  
}  
flight\_cb.addEventListener(“change”, flightcomboFunction);

then i need somthing to gather all selected items and return it to:

\_root.business\_mc.position\_xml.direction = “receive”;  
\_root.business\_mc.position\_xml.URL = “position.php?description\_run=”+flight+"&Publicati on\_pub="+publication+"&Advert\_Price\_imp\_dir="+pric e;

// this works fine… \_root.business\_mc.position\_xml.URL = “position.php?description\_run=week 1&Publication\_pub=The Star&Advert\_Price\_imp\_dir=R300”;

pritty please with a cherry ontop could you help me with this. ideally using the change fn or either on a button release event
