Código HTML:
<form id="form1" name="form1" method="post" action="fproducto.php"> <table width="400" border="1"> <tr> <td width="120">Nombre</td> <td width="270"><label for="nombre"></label> <input type="text" name="nombre" id="nombre" /></td> </tr> <tr> <td>Dosificacion</td> <td><label for="dosificacion"></label> <input type="text" name="dosificacion" id="dosificacion" /></td> </tr> <tr> <td>Marca</td> <td><label for="marca"></label> <input type="text" name="marca" id="marca" /></td> </tr> <tr> <td>Descripcion</td> <td><label for="descripcion"></label> <textarea name="descripcion" id="descripcion" cols="45" rows="5"></textarea></td> </tr> <tr> <td> </td> <td><input type="reset" name="button" id="button" value="Limpiar" /> <input type="submit" name="button2" id="button2" value="Enviar" /></td> </tr> </table> </form>
Código HTML:
<?php $sql4=mysql_query("SELECT nombre FROM producto ORDER BY Nombre ASC ",$con); ?> <select name="lista" onchange="pedirDatos()" > <?php while($row = mysql_fetch_array($sql4)){ echo "<option value=\"".$row['nombre']."\">".$row['nombre']."</option> \n"; } ?> </select>