Drop Down menu in PHP

grsha

New Member
I want to add a drop down menu in my Php form (backend: postgresql): I want to display supplier details in a drop down fashion: Suppliers are 1. Nasik, 2. Hyderabad, 3. OfficerMy Code: \[code\]<tr><td class="lbl_Fonts" height="30">Supplier<font color="red"> *</font> </td><td colspan="1"> <select name="cmbStamp" onChange="" style="width:200px;" > <option value='' > SELECT </option> <?php $sql= "select supplier_name from supplier_details"; $row =$conn->Exec($sql); while(odbc_fetch_into($row,$Record)) { echo "<option value ='" .trim($Record[0]). "'>" . trim($Record[1]) . "</option>"; } odbc_free_result($row); ?><td width="21%">&nbsp;</td> </tr>\[/code\]Can any one help me where I have gone wrong, currently with this code it shows a blank drop down menu.Thank you!
 
Back
Top