how to use do while variables outside the select tag

kpraveen
06:06:12
<select name="btype" class="style2" id="btype" onchange="fslcode(btype.value)" style="background-color:#FFFFCC">
<option value="" selected="selected"></option>
<?php


$conn=odbc_connect('lkalsofterp','sa','lami');
$sql="select slcode,slname,rate_type from fa_slmas where left(slcode,2)='DF' and rate_type<>'' ORDER BY SLCODE";
$rs=odbc_exec($conn,$sql);
do {
$btype=odbc_result($rs,"slcode");
$slname=odbc_result($rs,"slname");
?>
<option value="<?php echo $btype;?>"><?php echo $slname;?> </option>
<?php } while (odbc_fetch_row($rs)); ?>
</select>
smo1234
07-04-2012
This will help. Read how drop down list box is populated by taking data from mysql table
Please Login to post your reply or start a new topic