Forum Sign UP Login Contact Us
HOME : Forum : PHP programming : Post New Topic
how to use do while variables outside the select tag
kpraveen
06:06:12 06:57
<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>
subhendu
07:04:12 10:33
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
Privacy Policy | Disclaimer
©2000 - 2014 plus2net.com All rights reserved worldwide