php - Creating dropdown menu in form with mixture of input type text from main table and dropdown options for secondary tables -


i attempting display data 3 different database tables in php form. want edit page shown below if inventoryid isn't set show current selection of inventoryid have selected. other tables working through inventory table fetch data. example, type has table named typeid , id table 1 , name tyid desktop monitor. type entry inventory table integer 1. same descriptor table name descriptorid , id 1 selected on main inventory table. have used left join display tables want know how can add dropdown box form instead of integers tables typeid , others. code below shows current values of inventory table integers selected secondary tables how can make selections dropdown boxes while still displaying current selection , still allow input text other selections?

    <form action="" method="post">             <div>                 <?php if ($inventoryid != '') { ?>                      <input type="hidden" name="inventoryid" value="<?php echo $inventoryid; ?>" />                     <p>inventoryid: <?php echo $inventoryid; ?></p>                 <?php } ?>                  <strong>descriptor: *</strong> <input type="text" name="descriptor"                     value="<?php echo $descriptor; ?>"/><br/>                 <strong>type: *</strong> <input type="text" name="type"                     value="<?php echo $type; ?>"/><br/>                     <strong>serial: *</strong> <input type="text" name="serial"                     value="<?php echo $serial; ?>"/><br/>                     <strong>servicetag: *</strong> <input type="text" name="servicetag"                     value="<?php echo $servicetag; ?>"/><br/>                     <strong>citytag: *</strong>                 <input name="citytag" type="text"                     value="<?php echo $citytag; ?>"/>                 <p>* required</p>                 <input name="submit" type="submit" class="button" value="submit" />             </div>             </form> 


Comments

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

python - build a suggestions list using fuzzywuzzy -