<?PHP
include("Drop_Down.class.php");
//This example use SQL
//SQL query to run
$sqlbiz = "SQL to run";
//Create a new object of DropDown();
$drop_bnames = &new DropDown();
//SEt the name of the <select> in this case this will be <select name="bnames">
$drop_bnames->Dd_name = "bnames";//default its select
//Set params to the select like javascript or styles in this case we are using a javascript to catch the text of the option to a hidden
//input. so dont use it or you will get and error. in case you want to use it just create the hidden input with name biz_name.
//$drop_bnames->Params = "onchange='javascript: //document.frmAnalysis.biz_name.value=document.frmAnalysis.bnames[document.frmAnalysis.bnames.selectedIndex].text;'";
//Set the name of the first option that will apear in thi case <select name="bnames"><option>Select A Business Name<option>
$drop_bnames->Dd_select_option = "Select something";//defalutl its Select an Option
//Set the value to select
//$drop_bnames->Cache_value = $_POST['bnames'];//optional
//Send the sql and method to the class
$select = $drop_bnames->Dd_src($sqlbiz,"SQL");
//output.
echo $select;
?>
|