Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

137
Vistas
Select option with input text

I try to use input text for select option and i found this script from google

<input type="text" list="airports" name="airports"> 
<datalist id="airports">
<option value="Berlin">
<option value="Los Angeles">
<option value="Moscow">
<option value="Paris">
</datalist>
<input type="submit" value="confirm">

Here my script before :

<?php
$first="select * from members";
$two=mysql_query($first)or die("You Die!"); ?>
<select>
<? while($three=mysql_fetch_array($two)){ ?>
<option value=<? echo $three['firstname'];?><? echo $three['firstname'];?></option>
<? } ?>
</select>

When i combine them :

<?php
$first="select * from members";
$two=mysql_query($first)or die("You Die!"); ?>
<select>
<input type="text" list="firstname" name="firstname">
<datalist id="firstname">
<? while($three=mysql_fetch_array($two)){ ?>
<option value=<? echo $three['firstname'];?>><? echo $three['firstname'];?></option>
<? } ?>
</datalist>
</select>

it doest work t_t"

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

try this:

<?php
$first="select * from members";
$two=mysql_query($first)or die("You Die!"); ?>
<select>
<input type="text" list="firstname" name="firstname">
<datalist id="firstname">
<? while($three=mysql_fetch_array($two)){ ?>
<option value="<? echo $three['firstname'];?>">
<? } ?>
</datalist>
</select>
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda