Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

133
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!