Ver Mensaje Individual
  #13 (permalink)  
Antiguo 11/07/2012, 10:02
malcom1881
 
Fecha de Ingreso: julio-2012
Mensajes: 16
Antigüedad: 11 años, 9 meses
Puntos: 0
Respuesta: select desplegable con PHP

lo subo entero otra vez

Código HTML:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  4. <title>Untitled Document</title>
  5. </head>
  6.  
  7.  
  8. <form ID="insertar" name="insertar" method="POST" action="insertar.php"  >
  9. Emplazamiento:
  10. <select name="emplaza">

Código PHP:
Ver original
  1. <?PHP
  2. include ('configuracion.php');
  3. include ('acceso.php');
  4. $pet = "SELECT * FROM emplazamiento";
  5. $query = mysql_query($pet);
  6. if (mysql_num_rows($query)) {
  7. echo '<select name="EB">';
  8. while ($datos = mysql_fetch_array($query)) {
  9. echo '<option value="'$datos[EB]'">'.$datos['EB'].'</option>';
  10. }
  11. ?>

Código HTML:
Ver original
  1. </select>
  2.  
  3. Item :<input type="text" name="item" value="" size="18" maxlengh="18"/> <br />
  4. <input type="submit" value="Cargar" name="SUBMIT" />
  5.  
  6. </form>
  7. </body>
  8. </html>[HIGHLIGHT="HTML"]
[/HIGHLIGHT]