数据库里面内容在web页面select标签中显示

来源:互联网 发布:109wdd的秒的数据 编辑:程序博客网 时间:2024/05/18 01:45
 <form name="myform" method="post" onsubmit="return checkdata();" action="device_query_modify.php?id=<?php echo $msgid;?>">
    <table width="100%" border="1" style="border-collapse:collapse" bordercolor="739ACE">
      <tr>
        <td  bgcolor="#739ACE" align="center" colspan="2"><span class="STYLE1">环境信息</span></td>
      </tr>
   <tr>
    <td>
    <table width="100%" border="1" style="border-collapse:collapse" bordercolor="DEE3EF" rules="rows">
    <tr>
   <td align="right" width="615">Interface:</td><td align="left" width="615"><input type="text"  name="devicename" width="20"  value="<?php echo $msg['eth_name'];?>" /></td>
    </tr>
    <tr>
   <td align="right" width="615">Type:</td><td align="left" width="615"><input type="text" name="devicetype" width="20"  value="<?php echo $msg['type'];?>" /></td>
    </tr>
    <tr>
   <td align="right" width="615">getMethod:</td><td align="left" width="615"><input type="text" name="devicetype" width="20"  value="<?php echo $msg['get_method'];?>" /></td>
    </tr>
    <tr>
   <td align="right">IP:</td><td align="left"><input type="text"  name="deviceno" width="20" value="<?php echo $msg['eth_ip'];?>"  /></td>
    </tr>
    <tr>
   <td align="right">Netmask:</td><td align="left"><input type="text" name="deviceroom" width="20" value="<?php echo $msg['eth_netmask'];?>"  /></td>
    </tr>
     <tr>
    <td align="right">入库时间:</td><td align="left"><input type="text" onfocus="selectDate(this)" name="putinstoragetime" width="20" value="<?php echo $msg['PutInStorageTime'];?>"  /></td>
    </tr>
    <tr>
   <td align="right">设备价格:</td><td align="left"><input type="text"  name="deviceprice"width="20" value="<?php echo $msg['DevicePrice'];?>"  /></td>
    </tr>
    <tr>
   <td align="right">设备类别:</td><td align="left"><input type="text" name="devicecategory" width="20" value="<?php echo $msg['DeviceCategory'];?>"  /></td>
    </tr>
     <tr>
   <td align="right">规格:</td><td align="left"><input type="text" name="devicespecification" width="20" value="<?php echo $msg['DeviceSpecification'];?>"  /></td>
    </tr>
   <tr>
   <td align="right">设备状态:</td><td align="left">
   <!--<input type="text" name="devicestate" width="20" value="<?php// if($msg['DeviceState']==1) echo "正常"; if($msg['DeviceState']==0) echo "待修";if($msg['DeviceState']==-1) echo "报废";?>"  />-->
   <select name="devicestate">
   <option <?php if($msg['DeviceState']==1) echo "selected=selected"; ?> value="1">正常</option>
   <option <?php if($msg['DeviceState']==0) echo "selected=selected"; ?> value="0">待修</option>
   <option <?php if($msg['DeviceState']==-1) echo "selected=selected"; ?> value="-1">报废</option></select>
   </td>
    </tr>   
    <tr>
   <td align="right">报废时间:</td><td align="left"><input type="text" onfocus="selectDate(this)" name="devicescraptime" width="20" value="<?php echo $msg['DeviceScrapTime'];?>"  /></td>
    </tr>
    <tr>
   <td align="right">生产厂家:</td><td align="left"><input type="text" name="devicemanufacturers" width="20" value="<?php echo $msg['DeviceManufacturers'];?>"  /></td>
    </tr>
     <tr>
   <td align="right">资金渠道:</td><td align="left"><input type="text" name="devicefromfund" width="20" value="<?php echo $msg['DeviceFromFund'];?>"  /></td>
    </tr>
    <tr>
   <td align="right">设备责任人:</td><td align="left"><input type="text" name="devicemanager" width="20" value="<?php echo $msg['DeviceManager'];?>"  /></td>
    </tr>
    <tr>
   <td align="right"><input  type="submit" value="确定" />&nbsp;</td><td align="left">&nbsp;<input  type="reset" value="重置" /></td>
    </tr>
  </table>
   </td>
 </tr>
 </table>
</form>